Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Cache headers

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 419 Views
  • Spaghetti
    Avatar
    Community Member
    31 Posts

    Cache headers Link to this post

    I've been advised that caching is not working on my site. I find this odd because I'm explicitly setting the following in my config:

    Director::set_environment_type("live");

    Shouldn't this enable caching by default?

    I've just checked my headers using telnet and found this:

    Cache-Control: no-cache, max-age=0, must-revalidate, no-transform

    How can I set max-age to something more suitable for my site?

  • Bambii7
    Avatar
    Community Member
    254 Posts

    Re: Cache headers Link to this post

    It looks like you can set cache age in the config file

    HTTP::set_cache_age()

    It's a good question and I can't say I've looked into the caching that much. What was the telnet command you used to reveal the cache info?

    http://doc.silverstripe.org/framework/en/howto/cache-control

    http://api.silverstripe.org/3.0/class-HTTP.html#_set_cache_age

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