Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my Windows Server 2008 R2 machine, I configured to use Server AppFabric Caching features.

It has a nice API which I can implement as default caching provider on my ASP.NET MVC applications.

One question I have in my mind is this: What happens when the memory runs out?

In that machine I have 4GB memory. I looked around but couldn't find anything which enables me to configure max. memory usage for AppFabric.

Any idea how should I act in this situation?

share|improve this question

1 Answer 1

You can configure the total memory to be used for AppFabric caching on each cache host in a cluster using the Set-CacheHostConfig Powershell cmdlet. Use the CacheSize parameter (quoted in MB) e.g.

Set-CacheHostConfig -HostName MyCacheServer -CachePort 22233 -CacheSize 1024

Each cache host also has two memory thresholds, the low and high water marks, expressed as a percentage. I can't find it explicitly written down anywhere on MSDN, but I assume these are percentages of the cache size, rather than the percentage of total memory on the machine. Again, you can tune these settings with Set-CacheHostConfig.

As stated in Expiration and Eviction, once the low water mark is reached, expired objects are evicted from the cache (which to me raises the question of why they aren't evicted once they expire but that's for another day) on a Least-Recently-Used basis. If the high water mark is reached, unexpired items will be evicted until the low water mark is reached.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.