1

I have an include that is doing a DB query (it generates a menu of entries) and that's used more than once on a template.

Is there a way I can cache the first parse for later use to cut down on DB hits?

2

You would wrap the code in your include in cache tags and use the keyword globally with it.

{% cache globally for 3 years %}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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