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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

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

Output buffer caching


Go to End


4 Posts   2774 Views

Avatar
siulun

14 Posts

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.

Regards

Avatar
Tim

Community Member, 201 Posts

4 October 2007 at 9:47am

Edited: 04/10/2007 9:47am

Sam, our CTO has recently done some some work in the area of outputting static HTML pages for one of our clients which recently had a massive surge in traffic following TechCrunch40.

That would probably be a good place to start

Avatar
Sam

Administrator, 690 Posts

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.

Avatar
hitautodestruct

Community Member, 19 Posts

17 March 2008 at 8:17pm

Edited: 17/03/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?