Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Caching value

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: 313 Views
  • Stef87
    Avatar
    Community Member
    66 Posts

    Caching value Link to this post

    SilverStripe 2.4.7

    Hi

    I need urgent help with this but basically I am trying to allow json to be passed to a method via a url call.

    I wrote the method and it works but only once, then it seems to cache something that stops the method running again.

    Can someone please help me out with this? I read that Restful Server allows something like this but I have no idea how to implement it.

    I would greatly appreciate any help.

  • simon_w
    Avatar
    Forum Moderator
    473 Posts

    Re: Caching value Link to this post

    This usually happens when you use GET for the request. There's two main ways to get around this:
    - Use POST instead
    - Append the current time to the request. So your URL would be 'url?' + (new Date).valueOf()

  • Stef87
    Avatar
    Community Member
    66 Posts

    Re: Caching value Link to this post

    Another great piece of advice. Thanks so much.

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