5.6 FPC with mobile theme
Permalink
Scenario:
- Customer has a 5.6 website and wants to redirect visitors to mobile page depending on an attribute and whether visitor is on a mobile device.
- Customer has Full Page Caching (FPC) enabled and disabling it is gonna make the website significantly slower.
What are the options?
Would the best option be to modify the dispatcher.php so $c is being loaded before check_page_cache.php?
- Customer has a 5.6 website and wants to redirect visitors to mobile page depending on an attribute and whether visitor is on a mobile device.
- Customer has Full Page Caching (FPC) enabled and disabling it is gonna make the website significantly slower.
What are the options?
Would the best option be to modify the dispatcher.php so $c is being loaded before check_page_cache.php?
Thanks for pointing this out. I did some testing and yes, it seems totally possible. At the moment I'm overriding PageCacheRecord and I've added a few custom properties to the cache record. In the FilePageCache override I've changed the 'deliver' method that checks for certain properties in the cache record and optionally redirects a user.
Cool. Thanks again.
Cool. Thanks again.
Actually, this might be even better solution as it wouldn't possibly conflict with any upcoming changes to the file cache type.