Added query cache

Added query cache