Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Output buffer caching

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

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

Page: 1
Go to End
Author Topic: 1970 Views
  • siulun
    Avatar
    14 Posts

    Output buffer caching Link to this post

    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

  • Tim
    Avatar
    Core Development Team
    201 Posts

    Re: Output buffer caching Link to this post

    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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Output buffer caching Link to this post

    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.

  • hitautodestruct
    Avatar
    Community Member
    19 Posts

    Re: Output buffer caching Link to this post

    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?

    1970 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.