I've made a module that needs to cache its output by country, or not at all. I've found this post which describes how to do it with a component, but how would you do it with modules?

To turn off cache completely, I've copied the relevant fields from XML config from mod_custom, set cache to off, and global cache to conservative. Still it caches.

Any tips welcome.

Edit: It seems a module is always cached when it's included within an article: https://forum.joomla.org/viewtopic.php?t=527208

1 Answer 1


First a comment on your last statement on embedded modules being always cached - our experience, in fact, shows the complete opposite. Our post is much more recent than the answer in the Joomla forum (the one on the Joomla forum is also for a very old version of Joomla - ours is for Joomla 3.x).

Now to answer your original question, you can always use the get and store methods of the JCache class. This way, you will be able to easily cache and retrieve your module's data.

  • Strange. Which version of Joomla are you using? Mar 27, 2017 at 22:11
  • The post was about Joomla 3.x - not sure if this applies to the latest version though, but again, our post is much more recent than the post on the Joomla forum.
    – itoctopus
    Mar 27, 2017 at 22:17

Your Answer

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

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