- Issue created by @brianperry
Assuming that we have implemented a way to evict the cache β , we can then expose an option on individual request methods to 'refresh' the cache. This will first evict the cache at the specified cache key, and then make a fresh API request that will then be cached.
* Make a cached request.
* It lives in the cache forever.
* For methods that accept a getOptions object (getCollection, getResource, getResourceByPath in JsonApiClient, translatePath in DecoupledRouterClient) add a refreshCache option. If this is true, the cache at the resulting key will be evicted/removed and then the API call will proceed as normal.
* Update the getOptions interface to include a refreshCache option.
* Honor this option in JsonApiClient methods - getResource, getCollection, getResource by path.
* Honor this option in decoupledRouterClient methods - translatePath.
* Add test coverage.
* Update documentation.
* Get methods will now accept a refreshCache option.
Active
Code