Setting up query specific cache.