superagent-cache icon indicating copy to clipboard operation
superagent-cache copied to clipboard

Optionally set cache items on POST/PUT

Open jpodwys opened this issue 9 years ago • 0 comments

When a response comes back from a POST or a PUT, often all of the new/updated asset's information in known by the client. It could be a nice convenience option to be able to have superagent-cache automatically cache the POST/PUT payload, merged with response.body for the given call, if the call is successful. The cache key would simply need to have some fields replaced before adding it to the cache.

jpodwys avatar Oct 02 '16 23:10 jpodwys