How to limit memory/item size in a named cache in windows app fabric cache?

390 Views Asked by At

I am relatively new to .net / windows technologies and I need to use appfabric cache for a project.

After spending some time, I feel that one of the basic functionalities of a cache framework, namely limiting the size of a cache, is absent in the appfabric caching framework. I know that popular java caching frameworks like ehcache and hazelcast has this functionality through xml configuration elements (maxElementsInMemory attribute in ehcache , max-size attribute in hazelcast).

I know that this question has been asked previously in a similar form:

How to set Windows Server AppFabric named cache size?

However, I could not find a conclusive proposal to limit cache size per named cache basis in app fabric.

I need to expose caching apis to several application development groups. Each group is supposed to be assigned their own named cache but I need a mechanism to prevent cache abuse. Each cache user should live with their own limited named cache space. I.e they should not consume more memory than the amount reserved for them.

I do not want to write ugly custom code in my api to limit this and I believe that this is a basic requirement that a caching framework should support.

Any proposal for how to achieve this in app fabric will highly be appreciated.

Thanks

0

There are 0 best solutions below