1

There is a website made in Joomla 2.5.x. It has System Cache enabled. The website contains a component called com_magic that handles URLS like:

https://websiteurl.com/bikes?view=best
https://websiteurl.com/bikes?view=latest

System Cache timeout is set globally to 7 days. But the problem is with latest view. Each day a cron job fetched data from bike provider endpoint. It checks if there are new bikes. And if yes, it adds them to the database.

Unfortunately since system cache is set to 7 days, if a new bike occurs, the latest url does not display new bikes until the cache gets invalidated.

The cache for both page and component com_magic should be therefore cleared:

  1. Each day or
  2. When new bike becomes available

For URL:

https://websiteurl.com/bikes?view=latest
  • How to clear cache for above URL both for page cache and com_magic component cache programatically? Or:
  • How to change cache timeout for page and com_magic component for this URL to 1 day specifically? Or:
  • How to disable caching for this particular URL for page and com_magic component?

Important note: This is a question about backend Joomla cache. NOT about browser cache!

1 Answer 1

0

I'm not fully sure (in Joomla 2.5) but most probably you can set that too in Joomla backend extensions-> plugins->System - Page Cache -> Exclude Menu Items. If you have the bikes under a menu for example.

In the same plugin (at the same place), if there is an advanced tab in that plugin settings, you will find the Exclude URLs option too.

(This is how you can set the core cache plugin in Joomla 3.x but I think these options were already available in Joomla 2.5 too)

If the above settings do not exist in Joomla 2.5 then I would suggest you to download a good caching extension (there are plenty of those) and fine tune your Joomla caching with that. From the many I would use for example this: https://extensions.joomla.org/extensions/extension/core-enhancements/performance/jotcache/

Here you can find the version for Joomla 2.5 (jotcache 4.2) http://www.jotcomponents.net/home/web-programming/jotcache/download/archive

But you can choose others if you can find an extension still for Joomla 2.5: https://extensions.joomla.org/category/core-enhancements/performance/

(side note: unfortunately Joomla 2.5 is so old that it's really a big wasting of time for even thinking about writing any plugins for this kind of job just to clean the cache for a specific component, even if it would be quite a fast job to create that plugin or modification of that component.)

1
  • Hello @Zollie. In 2.5 unfortunately there is no such option. Jan 14, 2019 at 8:13

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.