caching - Controlling ASP.NET output cache memory usage -


I would like to use output caching with WCF data services and although nothing has been made to support caching , There is an on-process processing review method which allows me to set the cache of requests using hooks and normal ASP.NET mechanisms.

But if large reactions have been cached, then I am worried about the process of recycling the cause of excessive memory consumption, is there any way to specify upper limit for ASP.NET output cache? So, if this limit has been reached, then the items in the cache will be dismissed?

I have looked at the configuration settings but I have been impressed by documentation which is for clear caching through the cache object, because it has a different, with no memory-related features.

A code snippet from here shows how I am setting up the capability.

Safe override zero on-process processing requests (processorErggs args) {base.OnStartProcessingRequest (args); // cache HTTPTPTC reference reference = HTTXT for one minute based on query. On; HttpCachePolicy c = HttpContext.Current.Response.Cache; C.SetCacheability (HttpCacheability.ServerAndPrivate); C.SetExpires (HttpContext.Current.Timestamp.AddSeconds (60)); C. Verb head ["accept"] = true; C. Verbid headers ["accept-charset"] = true; C.VaryByHeaders ["Accept-Encoding"] = True; C.VaryByParam ["*"] = True; }

Ah! Now I feel dumb ... It seems that I can fix this limit, which is understandable because the IIS estimates that the output caching services are being made available to ASP.NET in the first place.

And as an additional bonus it seems that the IIS has already missed some reasonable settings for this:

Maximum cached response size ( Bytes) Specifies the maximum size of the cached response for both users- mode and kernel-mode cache default value is 262144 bytes. This field is only enabled at the server level; It is read only at all other levels.

Both the cache size limits (in MB) configure the size and size of the user-mode and kernel-mode cache. You can type a size (in MB) or type 0. If you type 0, IIS half available available physical memory or virtual memory, whichever is less, this field is only enabled at the server level; It is read only at all other levels.


Comments