Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

WS response caching...

$
0
0
Are there any good strategies for systematically caching WS responses based
on cache control headers, rather than doing so on an ad-hoc basis?

I was vaguely mulling some kind of scheme whereby I wrap WS calls to our
web service and bung GET responses in the play.api.cache.Cache if they have
an appropriate max-age, then invalidate them on POST, PUT, DELETE. However
I'm concerned that this:

- can already be accomplished by some configuration elsewhere (perhaps
in the underlying HTTP lib), or
- is just too rube-goldberg-esque and error prone to be worthwhile
- is going to require re-implementing a substantial subset of the
existing WS API

Anyone attempted anything similar?
Cheers,
~Mike

Viewing all articles
Browse latest Browse all 6551

Trending Articles