1

I'm trying to using craft caching to cache a page without query string vars.

This tag

{% cache using key craft.request.path  %}

{% endcache %}

throws an error

Unexpected token "name" of value "using" ("end of statement block" expected)

This example is right from the Craft Docs, https://craftcms.com/docs/templating/cache

If I remove the "using ..." everything works fine.

Any ideas?

1
  • Works fine for me locally? Can you share the surrounding template code? Maybe some other template code is contributing to the error. Also, what's the URL look like when you get the error?
    – Brad Bell
    Commented Dec 1, 2014 at 18:35

1 Answer 1

3

Make sure you're running the latest version of Craft. using key didn't come until Craft 2.2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.