Using Evo1.0.4 rev 6981
Hi, i currently have a resource sitting in manager which contains a snippet which takes querystring params and renders content from the database.
lets say the page in question is test.html?country=france
I am trying to find a way on how to use the caching mechanism with this whilst still retaining ability to change the querystring and have multiple cached snapshots of the same page for different countries.
If i just enable caching on the above page and change the querystring to ?country=spain it will still render the cached output from ?country=france. I know i can set the snippet to uncached and avoid this, however i would prefer to get the whole of page content cached rather than run extensive coding within my snippet each time the page is sent to the browser.
Is there a way to do this? Or would i need to acutally duplicate my resource, and have 1 resource for each country which can then be fully cached (seems illogical).
Basically my requirement is to have multiple cached versions of the same resource based on the querystring.
-
☆ A M B ☆
- 3,141 Posts
I personally prefer YAMS for multilanguages on Evo, and I think it’s got the cache thing settled too.
I’m not sure if you can override the caching in Evo, but you could use a custom uncached snippet in Revolution, which in turn would fetch and cache data.
-
☆ A M B ☆
- 3,141 Posts
I guess you could write your own caching in a snippet on Evo too..
any pointers? Theres not a lot of example code on forums regarding caching...
-
☆ A M B ☆
- 3,141 Posts
That’s the thing - I don’t think there’s a way to override / re-use caching mechanisms in Evolution.
Revolution has a caching method you can use for your custom components aswell, but Evolution doesn’t to my knowledge.
You could write a caching mechanism that stores content information in a file on your server. Here’s something that might help. Remember that you can only use PHP in snippets.
http://www.theukwebdesigncompany.com/articles/php-caching.php