Add query cache and more