0

I have this question and I would like to know if it is management by IIS or Asp.net Framework which save it on server disk or in-memory.

I'm studying Azure Shared Caching looking for OutputCache and save data fetch from database resources.

At my studying conclusion, I will decide to do cache all Action Result or ChildActionOnly.

Thanks!

haim770
  • 48,394
  • 7
  • 105
  • 133
Alexsandro
  • 1,191
  • 1
  • 14
  • 22

1 Answers1

2

By default OutputCacheLocation.Server simply means that the data is stored in IIS Worker Process memory space. if you enabled Kernel-Mode caching the data is stored in the Http.Sys driver memory space (which is an Operating System process, not IIS process).

In the case of Windows Azure Shared Caching, the data is serialized and stored in a special process on the Virtual Machine instance, that process is then responsible for managing and synchronization of the cached data between all of the Role instances.

haim770
  • 48,394
  • 7
  • 105
  • 133
  • Interesting, so, after long time, Worker Process memory consumption, memory goes to sky. I presume and it not a good thing. May I implement a custom outputcache to write a disk or memcached some time could be better. And about Windows Azure Shared Caching and Windows Azure Caching is not same, right? – Alexsandro Jul 14 '13 at 22:48
  • You don't have to worry about memory consumption, it's up to IIS to manage this stuff and once it's reaching it's (configured) limit, it may persist some data to disk or evict some items, depends on your configuration. see http://technet.microsoft.com/en-us/library/cc772095(v=ws.10).aspx – haim770 Jul 15 '13 at 06:07
  • `Azure Shared Caching` is some sort of 'Caching as a service` module (with monthly payment for the cache size you consume). `Azure Role Based Caching` - on the other hand - is a caching service that you deploy in your own role instance, either as a dedicated stand-alone worker role that facilitates much of it's available memory for caching, or as a co-located role that uses some pre-configurable amount of memory of an existing web/worker role for distributed caching. – haim770 Jul 15 '13 at 06:31
  • You told me, I don't have to worry about IIS memory consumption, why not? IIS memory it's `my responsibility as developer`, if my app consumes lot memory, is my responsibility. My app there a 3000 pages, `1000 of those 3000 page I wish cache it`. By default IIS Output cache is Kernel-Mode enable, I have to make sure this cache will not recycle even time or if my server should have more memory RAM or another cache solution. – Alexsandro Jul 17 '13 at 04:42
  • You **do** have to worry about IIS memory consumption that is used by **your** deployed application/code. i just meant you don't have to worry about memory management of the **Output Cache** module (which is a not your code and built-in IIS). quoting from the link in my recent comment: `When the default value of 0 is set, IIS automatically manages the cache memory size.`. – haim770 Jul 17 '13 at 07:25