17488 Posts in 4473 Topics by 1978 members
|Go to End|
4 October 2007 at 6:39am
While I'm not entirely sure how SS handles its current cache. One thing I'm very sure is that the caching is not effective enough for me and anyone else who may be thinking of creating big sites using SS. The only solution to this problem is if output buffer caching can be built into the system.
To be honest I would suggest this to be done earlier rather than later - as SS becomes more complex - when it comes to implementing output buffer cache - life would be hell to try and ensure every module that cannot be cached (for example due to permission check before page is displayed) have some sort of no-cache flag.
I personally see output buffer caching as an essential part of any PHP powered websites as not only does it let your website have the performance of a static HTML site - it also reduces server load from both the web server AND database server by a huge amount (>500%).
If someone could shed some light on how the current system + architecture works - I may even look into building this myself.
Core Development Team
4 October 2007 at 9:47am Last edited: 4 October 2007 9:47am
5 October 2007 at 9:04am
There's the beginnings of a system for this in the subversion trunk - a class called StaticExporter.
If you visit http://www.yoursite.com/StaticExporter/ and log in as an admin, it will let you download a .tar.gz with a complete static dump.
My thinking around this was that pages could be marked as static/dynamic on a class-by-class, or even page-by-page case. Allowing for an isCacheable() method on each controller class could work.
However, the expiry of the cache is a tricky problem - it depends on more than just the content of the page itself - it depends on the content of all the menus on the page, etc.
17 March 2008 at 8:17pm Last edited: 17 March 2008 8:17pm
This is exactly what I was looking for a static exporter for the site.
I was just trying it out and it threw this ugly error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4980736 bytes) in /tmp/silverstripe-cache-web-dev.wiztekmedia.com-http-html/cache.php on line 4
Any thoughts on how I can get my site static version?
|Go to Top|