Sub Second Caching

Comments

4 comments

  • Austin Spires

    @rich subsecond caching isn't supported, but what are you attempting to do? There may be other configurations options for handling your request pattern other than a .5s TTL.

  • rich

    I would like to cache "ebay" like auction countdown responses. Requests are initiated by a client every second and update a user interface with time remaining and price. I have implemented a cache setting with a TTL of 1 second, which as is probably expected, mostly results in the timer staggering down in 2 second increments. I do not want to change the current design or implementation. I was hoping to bolt on caching in front of it. Any suggestions?

  • Austin Spires

    I'l have to keep thinking, but your end goals describes something that's almost inherently non-cacheable for practical purposes.

    If your primary concern is eliminating the "thundering herd" problem of a large cluster of users requesting the same objects at the same time, our request collapsing functionality will work even if you don't cache. If you set requests to have a 0s TTL or to Pass in a Cache Setting in our UI (or with logic in vcl_fetch if you're writing VCL), this should be set up properly.

  • ryantownsend

    I know you suggested you wouldn't want to change the implementation, but having built an auction site in the past – I relied upon some (very trivial) JavaScript for the live countdown, the HTML output was cached with a timestamp e.g. "This auction finishes at 10:32 on Friday 3rd of January", then the JavaScript would transform that into a live countdown. Would this solution be inappropriate here?

Please sign in to leave a comment.