Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

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:

Code:

if ( $fromCountryId == "IT" ) 

  return 152;
else
  return 151;

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

arathra
Beginner Modder
ranks
useravatar
Offline
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

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

metamodguy
useravatar
Offline
3328 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!

arathra
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Total Posts Today:
2
User Info:
 
Total Users:
4371
Newest User:
kajha63871
Members Online:
0
Guests Online:
210

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked