-
Notifications
You must be signed in to change notification settings - Fork 545
Add to Cache callback #75
Comments
Hi Christopher, that feature could be interesting. I suggest the method would have a signature like :
as you don't need any cache duration when adding something to cache. Cache duration is only used to consider whether something read from cache is expired or not. I believe that an easy way to add this feature would be to add a request through the spice manager. This request wouldn't actually perform any network call, but simply return the response in its load data from network method. The request would be configured not to read from cache (using param ALWAYS_EXPIRED with execute method). What do you think of this implementation idea ? And definitly yes, we would be happy of such a contribution, plus testing. |
Hi christopher, I am actually trying to implement the feature you requested. It happens that our team @octo-online currently needs this feature as well in order to mock a post request inside our current project. I hope to get it working and pushed and deployed to snapshot repo by the end of the day. Stéphane |
Fantastic that would be amazing. I haven't forgotten but it's part of performance improvements for my Cheers
|
Feature has been added o SpiceManager via methods : addDataToCache. A snapshot of 1.4.2 will be deployed within minutes. |
Pardon the comment on a closed issue--I just want to say this is a good new feature, thanks! I just encountered a need for this as well. In my particular case, the request result contains the key, so I couldn't cache it until after making the first request. This should allow me to addDataToCache in the request listener using the new key. |
So this might seem a bit of a weird one, but we use robo spice very restfully, but what would be nice is if we could push a response into another cache key.
This makes sense where A response from two or three responses returns a response with a updated version of another request.
so something like:
I would quite like this, I understand its no a high priority for you so I will look at implementing it.
If we could agree how this 'should' work then I can go an implement it.
The text was updated successfully, but these errors were encountered: