Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.


Metamod & Caching

Metamod & Caching

I've used metamod for a while but have found a slight issue with it and caching.

I'm using Joomla 1.5 and Metamod 2.12

On one page I have the IP check; if the visitor is from Italy then I show ModIT and if they're from elsewhere I show ModOther.

I had the system cache turned on but after reading on another post a similar problem I turned it off. The metamod cache is off also.

However, if I access the page from Italy it shows ModIT then the page is somehow cached and if I then access it from a non-Italian IP then it still shows ModIT.

If I clear the Joomla cache and access the page from a non-Italian IP it shows ModOther. If I then access if from an Italian IP it shows ModOther.

First I'd like to be able to have the sitewide cache working if possible; but more importantly I'd like to have Metamod working - it's being cached for some reason...

Thanks for your help!

PS - the code I use is:


if ( $fromCountryId == "IT" ) 

  return 152;
  return 151;

Edited By: arathra
07-Feb-12 14:44:08

Beginner Modder
2 Posts
Administrator has disabled public posting

Re: Metamod & Caching

Hi Arathra,

the system cache plugin determines which page/version is being cached ONLY via the URL of the page, and does not take into account any other factors. The entire page is cached, modules, template html and content included.

This is why the cache acts as it does, with people from the different countries seeing content that you intended to be cached for the *other* country.

Therefore there is a fundamental incompatibility between any sort of GeoIP selection of content/modules, and the system cache plugin.

Something I have used successfully in the past in this scenario is JotCache, which allows you to designate certain module positions as "not cached". In this way you could tell it not to cache the module position that these particular modules are in. This means that most of the page gets cached, but the modules will be calculated on every page load. You should still see some major speed improvements this way.

Best regards,

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

3330 Posts
User info in posts
Administrator has disabled public posting

Re: Metamod & Caching

Thanks - I'm still playing with different configurations and suchlike; I'll let you know how it goes with JotCache!

Beginner Modder
2 Posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
Total Posts Today:
User Info:
Total Users:
Newest User:
Members Online:
Guests Online:

There are no members online

Forum Legend:

 New Sticky