0

Is there a way to force a single Joomla (custom HTML) module to never be cached?

Im building a site where registrants login and can see up to the minute graphs specific to them.

The decision as to how caching will run on the site more generally has not yet been made but we would hope to be able to use view caching and page caching across the site. The ideal would be to only force this single module to fully refresh every time.

Problem is when the graphs are cached, even for a few minutes the performance is sub optimal. The graphs are loaded in a custom HTML module which contains PHP to pull the graph specific to the user.

Can anybody think of a way to prevent ONLY this module from caching?

  • What are you using to cache? Joomlas system cache plugin? Joomlas cache option from the gl9bal configuration? Cuatom apache/nginx rules? Or a 3rd party Joomla plugin? – Lodder Sep 28 '17 at 8:06
  • Currently we have all caching off. View caching from global config is off and page caching from system cache plugin is also off. Ultimately we would hope to have these on. With these off the module is still cached (by the browser) even with "no caching" selected under the module set up. – Paula Livingstone Sep 28 '17 at 8:42
  • Ive been reading some detail about setting params for the module but havent been able to get anywhere with that as Im not sure where the param settings should go. From elsewhere I have: <param name="cache" type="list" default="0" label="Caching" description="Select whether to cache the content of this module"> <option value="0">Never</option> </param> – Paula Livingstone Sep 28 '17 at 8:45
  • I guess we could always use meta on the pages this module will appear but Im hoping theres a more elegant way to just exclude the module from caching – Paula Livingstone Sep 28 '17 at 9:01
  • I wouldn't enable them all. You firstly need to know how caching works in Joomla and the different solutions. If you go to the Global Configuration and set the System Caching to Progressive, this will also cache modules. I think that disabling the cache per module will work. I'm not a massive bod on Joomla caching as I never use it. – Lodder Sep 28 '17 at 9:10

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.