Runtime query caching that really works