I am currently revamping our current website which runs on Drupal 6, and I have suggested to move it over to a custom CMS, which I will write using Laravel 4.1.
Most of it I have planned out, one of the major issues which I cannot seem to get my head around is regional caching.
Background of the Regions
We have different content for different regions, and what we are doing in the current site is appending a GET variable to the URL : example.tld/pageName/?region=123
This is fine, except the issue is caching, and our current caching system is terrible, it's slow and pointless even using it (driven from the database for a start). I want to cache the output to the disk, which means I can use something like memcached
or similar (or even the built-in Laravel caching methods).
What we're caching
Currently we are caching regional specific content on certain pages. For example:
Page 123 Region A
will have different content to
Page 123 Region B
And we cache the content depending on the region
So I have two main questions:
- What is the best way to store/retrieve the region ID for a specified user?
- What is the best way to store/retrieve the associated data for that page/view for the specified region ID?
Thanks!