Added prototype of query caching