Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Metamod & Caching
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;
07-Feb-12 15:44:08
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
- Index
- » MetaMod
- » MetaMod General Support
- » Metamod & Caching
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Posts this week:
- 2
- User Info:
- Total Users:
- 7642
- Newest User:
- mary26
- Members Online:
- 0
- Guests Online:
- 155
- 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