Jump to:

1385 Posts in 493 Topics by 522 members

Themes

SilverStripe Forums » Themes » Disable caching while theming

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 586 Views
  • Lime Blast
    Avatar
    Community Member
    22 Posts

    Disable caching while theming Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5511 Posts

    Re: Disable caching while theming Link to this post

    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
    Avatar
    Community Member
    22 Posts

    Re: Disable caching while theming Link to this post

    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.

    586 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.