Fix template options with query cache