I want to ensure that cache is set per domain at a config level. So rather than saying something like this in the template:

{% cache using key craft.config.getHostInfo ~ '.' ~ entry.slug ~ '.masterPrimaryNav' %}
{% endcache %}

I would like to set this in config so the cache key is prepended automatically. I had hoped that the general appId would help this on config, but I can't see that being set in the cache key when I set it: http://buildwithcraft.com/docs/config-settings#appId

Is there a way to do this?


appId wont help you there. If you take a look at the source code, you'll see how the appId is used in sessions.

I'm not aware of an automatic way to prepend cache keys.

| improve this answer | |

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.