views:

162

answers:

1

I'd like to know if there is a way to tell the Enterprise Library Caching objects to flush all configured caches for that process to flush.

Even enumerating through all of the configured caches for that process, and manually flushing each one, is ok, but is there an API method from EntLib.Caching that will give me those values?

Or do I need to enum through the config file myself?

A: 

I do not think that there is a way to flush all caches. Recycling the application pool would do it, but this would also cause your code to require a JIT compile.

We normally store the names of the caches in constants, to avoid the name being hardcoded several places in the code, if you store the names in an enumerable data type you could just go through it and flush them one at a time.

Shiraz Bhaiji