Add query cache for docsquery