Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Too much 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: 1097 Views
  • UncleCheese
    4085 Posts

    Too much caching? Link to this post

    Is there a way to turn down the caching in Silverstripe? Sometimes it's awfully stubborn and it becomes an inconvenience. I have some dynamic, non-CMS content on my homepage (a day countdown) that never gets updated unless the user does a hard refresh.

  • Ingo
    Forum Moderator
    801 Posts

    Re: Too much caching? Link to this post

    hm dynamic content shouldn't be cached between calls - only *.ss files are transferred into an intermediary php-syntax thats easier to parse (the "manifest"). the only "stubborn caching" issue i'm aware of is parsing <% include %> tags. can you provide code examples?

  • UncleCheese
    4085 Posts

    Re: Too much caching? Link to this post

    Thanks for your reply. I don't have access to the code right now, but imagine a homepage with some dynamic content from the CMS (latest blog entry), which is always accurate, and beside it, I have a countdown box that looks like this:

    <h3>$Countdown days until we get married!</h3>

    and in HomePage.php:

    function Countdown()
    $days = // calculate the number of days between now and the big day
    return $days;


    It's that $Countdown variable that seems really sticky. Gotta do a click-refresh every time.

  • Hamish
    Community Member
    712 Posts

    Re: Too much caching? Link to this post

    Are you sure it's not your browser or a caching proxy causing the issue?

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.