Disable Corporate Library Caching Application Block

We use the caching block of the corporate library caching (in memory) in our web service. Works great, no complaints.

We are starting to do load testing, and I was asked to turn off the cache so that we can get some idea of ​​what performance caching gives us. I thought that it would be easy - it turns out that no.

I can not find any configuration settings to disable the cache. I suppose I can reject the maximumElementsInCacheBeforeScavenging parameter, but is there a better way?

I found one post that suggests creating your own cache manager that does nothing - again, is there a better way to do this?

+4
source share
1 answer

It is best to provide a custom implementation of ICacheManager (the interface added in Entlib 4 cannot help for earlier ones), which does not store anything and never provides cache memory. Then you configure the block to use your "NullCacheManager" or whatever you want to call.

+1
source

Source: https://habr.com/ru/post/1306370/


All Articles