Add query cache
Add maintain code