23379 Posts in 18298 Topics by 2867 members
|Go to End|
22 August 2012 at 4:47am
When I add the following line
and also when I add the following lines
SS_Cache::set_cache_lifetime('any', -1, 100);
to the top of of [root]/mysite/_config.php
I find that elapse time is significantly less than if I add ?flush=1 to the end of the URL.
What is ?flush=1 doing which the code added to _config.php are not?
Indeed I sometimes find that in order to make changes to my templates show when I browse the page I have to resort to adding
to the end of the URL regardless of what code I have added to _config.php. This is a real pain and I would like to avoid having to keep doing this whenever I change a template.
Obviously the above refers to flushing the cache when serving page content. Browser cache may be playing a part here as well. Regarding browser cache, this reduced elapse time which I noticed when I relied on code added to _config.php not only happens when I browse the page using Google Chrome but also when I use IE with the browser set up so that page content is refreshed every time a page is browsed. I think this rules out the part played by the browser cache and points the finger at what is happening when page content is being served.
If anyone could point out to me what ?flush=1 may be doing different to SSViewer::flush_template_cache() and how I may avoid having to keep adding ?flush=1 to the end of the URL, that would be great.
22 August 2012 at 5:08am Last edited: 22 August 2012 5:08am
Ok, I may be speaking too soon, but adding the following line to _config.php may be doing something along the right lines
22 August 2012 at 5:17am
check this out... http://doc.silverstripe.org/framework/en/reference/urlvariabletools
22 August 2012 at 5:46am
Thanks swaiba. This helps to fill in the picture.
|Go to Top|