Implemented caching of queries > 1 second