Cache that always returns immediate response?

Posted by Col Wilson on Server Fault See other posts from Server Fault or by Col Wilson
Published on 2012-06-28T21:08:49Z Indexed on 2012/06/28 21:18 UTC
Read the original article Hit count: 174

Filed under:

I have a web service that takes a while to build a response despite being tuned as best I can.

What I'd like is some sort of cache sitting in front of the service which would always return the last known value from the service, but at the same time pass the request back to the service to build an up to date response for the next request.

I'm aware of the limitations that this puts on the freshness of the data, but you can assume that I'm happy to live with that.

The technologies I'm using at present are python uwsgi via nginx, but that need not be a limit to any solution you might suggest.

Col

© Server Fault or respective owner

Related posts about caching