Question

I'm migrating a WCF app to a WEB.API app.

One of the calls implemented in WCF is a "ResetCache".

On the server a simple cache is maintained for performance reasons (without the cache, the data has to be fetched from the database for every incoming call). So after the first fetch the data is stored in the cache ... works fine.

Once in a while, after changes have been made, the cache needs to be refreshed. One way that's done is (for testing purposes) using a call to the server ... RefreshState. In the current WCF solution it uses a POST.

Using RESTfull WEB.API, I can't figure out which verb nor url to use to activate this action on the server. It's not a get, its not a post, ... etc..

Anyone any thoughts on this?

Was it helpful?

Solution

I would suggest using DELETE and a url similar to: http://target/ext/cache or http://target/ext/cache/contents possibly. After the cache contents are deleted, I am assuming the next calls to your service would begin repopulating the cache.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top