Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Disable caching while theming

Go to End

3 Posts   1338 Views

Lime Blast

Community Member, 22 Posts

21 May 2013 at 9:14pm

Hi, sorry if this is a silly question (I'm new to Silverstripe, working on my first site today), but is there anyway of disabling the need for the query string`?flush=1` (`?flush=all`) upon changing a template file?

I can understand the need for caching while a site is in production, but during development, when you could be making lots of small changes to the template files, it would get very annoying to have to append the query string to every url I access on the site.

..or am I missing something?

Cheers :)


Forum Moderator, 5523 Posts

22 May 2013 at 9:58pm

Though in development it does add several seconds to page load time, which, if you're working on CSS and other stuff can prove annoying. Something like $_GET['flush'] = 1 in your _config.php or _ss_environment might work.

Lime Blast

Community Member, 22 Posts

22 May 2013 at 10:04pm

I might have been a little bit preemptive in my posting.

Having read the tutorials on this site, it was suggesting that you need to run the `?flush=1` after each and every template change because of the caching...

... however, having started building a site using SilverStripe, I've found that I've not yet needed to run the flush command, as the changes are reflecting straight away. I'm not sure why this is, I'm just glad it's working.

The only other thing I've done is created a silverstripe-cache directory, I don't know if this would have something to do with it?

In any case, right now I'm happy - I just hope that I've not somehow disabled the caching for when I come to putting the site online.