Revert "Fix template options with query cache"

This reverts commit 33f795382f8e74aac6e8d6f8b554cfec9b0dde65.
Merge