A Trick to Allow Long Period Caching, but Update New Styles/Content Immediately

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
kendo451

A Trick to Allow Long Period Caching, but Update New Styles/Content Immediately

Post by kendo451 »

The following article by Zach Johnson gives several methods for using long expire times on stylesheet caching but getting immediate results when you change the stylesheet.

http://articles.sitepoint.com/article/overcome-cache-conundrums

The methods he recommends would be rather cumbersome to do by hand.  But changing the stylesheet filename by adding a variable string to the stylesheet url every time it is updated would be really easy to do in the CMS Made Simple Core.

This allows you to set an expire time of, say a week, and yet have instant results when you update the stylesheet.
JeremyBASS

Re: A Trick to Allow Long Period Caching, but Update New Styles/Content Immediately

Post by JeremyBASS »

No one ever reads my tips lol  :P

here.. http://forum.cmsmadesimple.org/index.ph ... 682.0.html

This is the query way... and the udt to go with it...  Thought I'd include that here...
Cheers
Jeremy
Post Reply

Return to “Developers Discussion”