Disabling Cache in Silverstripe 3.1

While working with Silverstripe we found ourselves having to run “?flush=1” a lot to clear the Cache. To switch it off, while you work, add the following to your mysite/_config.php:


Published by

Matt Cockayne

Matt is both a PHP Developer and Scout Leader. Having tried his hand a few different careers he finds that he is happiest working with code as the Technical Lead at Magma Digital. As a framework contributor and serial tinkerer Matt has spent a long time working on being the best PHP Developer he can be. As a Scout Leader he spends a lot of his time devoted to teaching valuable life skills to kids aged 7-18. He is a firm believer that being a Good Scout and Great Developer go hand in hand.

2 thoughts on “Disabling Cache in Silverstripe 3.1”

  1. Works on 2.4.13 thank you.

    We are working with subversion and three versions of our code:

    Local = I put this line in my _localConfig.php to kill caching on my local

    Dev (a staging server published to the web)= _localConfig.php is not part of the version control deployment so I created and added this file manually via ftp  This file only contains this line of code, not all my local config code.  Caching is turned off now on our dev.  You’ll have to do one final flush=all to clear out the current contents of the cache.

    Live (the real site) = Live still has caching turned on as _localConfig.php is not part of the deployment.


Leave a Reply