add proper caching of results, using latest timestamp in resultset as last-modified