Jump to:

3444 Posts in 1030 Topics by 871 members

Template Questions

SilverStripe Forums » Template Questions » Cache template areas OR Best method for complex menus

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

Page: 1
Go to End
Author Topic: 1190 Views
  • Marcus
    Avatar
    Administrator
    86 Posts

    Cache template areas OR Best method for complex menus Link to this post

    Assume for a moment that I have a menu with ~1000 items in it (I know, from an IA point of view it's not ideal, but some clients do 'require' it). I haven't actually tested this yet, so I'm only thinking through based on what I've seen happen on other systems... but generally, this takes a lot of time to put together.

    Is there a way to specify in a .ss template that the output of a certain region should be cached as rendered for a period of time?

  • sdbruder
    Avatar
    Community Member
    4 Posts

    Re: Cache template areas OR Best method for complex menus Link to this post

    Ive just published an initial patch (against trunk) of caching suport for arbitrary methods of any Object-children, it's in silverstripe-dev (http://groups.google.com/group/silverstripe-dev/browse_thread/thread/d327a13ff58c45cb).

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Cache template areas OR Best method for complex menus Link to this post

    There is also a partial caching system that is due to be merged into 2.4 soon which will allow you to cache sections of templates.

  • markguinn
    Avatar
    Community Member
    13 Posts

    Re: Cache template areas OR Best method for complex menus Link to this post

    I'd love to hear more (or be pointed to a source to read more) about the partial caching in 2.4. We've faced similar problems and thus far solved them by using limited caching of objects (DataObjectSet, etc.) using Zend_Cache. It's worked ok, but I agree that it be helpful to have more options, such as caching part of a template, and would be happy to help that come to fruition. I see that Zend_Cache is now included in the 2.4 branch too so that's good news.

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: Cache template areas OR Best method for complex menus Link to this post

    markguinn - currently its not documented due to the fact it hasn't even made the core yet and the API could change in the mean time. Once its been released then you'll hear all about it

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