Cloud Computing: The Digital Shift 2.0 – Understanding the Current Market Trends

Page Cache control in radiant cms

Radiant Caching
Radiant cms is very powerful and customizable cms as of now which has inbuilt support for page caching.
Radiant caching mechanisam is somehow similar to action caching in rails.
In latest radiant version i.e. > 0.8 Responsecache has been replaced with Radiant::Cache.
By default radiant cache gets automatically invalidated after every 5 
minutes and that is configurable.
The interval is easily configurable by adding following lines inside environment

if defined? ResponseCache == ‘constant’    

    ResponseCache.defaults[:expire_time] = 4.hours


    SiteController.cache_timeout = 4.hours


There are situations where automatic cache inavalidation won’t work
and we need to clear radiant cache on the fly.
There are two ways to do that to invalidate radiant cache immediately.
1. Navigate to the root of your Radiant project and delete the cache directory.

cd /home/deploy/radiant_site/tmp

rm -r cache

2. Clearing the page cache from within your code

if defined? ResponseCache == ‘constant’





While building website using radiant cms, it happens that there are certain pages they are static and not going to change frequently that time configuring cache expiry time to long interval is going to be always beneficial and for pages which conatins dynamic content (displaying logged in user on homepage), we need to disable radiant cache for such pages. this can be done by using page_options extension.
Installation for radiant version  0.7

$ script/extension install page_options

Installation for radiant version  0.8 and higher

git clone git:// vendor/extensions/page_options

Restart server
1. Goto /admin/pages
2. Edit any page
3. Click on more link and edit cache settings.
For more information visit

0 thoughts on “Page Cache control in radiant cms”

Leave a Comment

Your email address will not be published.