In my webapplication I have some precalculated values that are stored in Page.Cache. At his moment I have to move this functionality to webservice.
So I need to introduce similiar functionality in webservice - calculate values on first call to web method and store it in Cache.
Is it possible to put some values in Cache (not in Application or Session - I need to purge those values after some time interval) from webservice?
Caching is very common to make applications performant and scalable. If a result is already computed by the application, it is cached in a store so that next time when the same request comes, cached result can be fetched instead of processing the request again.
Caching refers to storing the server response in the client itself, so that a client need not make a server request for the same resource again and again.
You can always access the Cache through the static HttpRuntime.Cache property, even if you don't have an HttpContext at the moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With