views:

134

answers:

1

Hi, I am trying to clear the cache for my integration testing. I could find "InvalidateCache" attribute in Spring documentation, but i do not want to touch the real function and change the attribute. I think I can't use .Net's HttpContext.Cache.Remove since my integration test application is not web application. Anyone knows how to do it?

+1  A: 

I think I can't use .Net's HttpContext.Cache.Remove since my integration test application is not web application.

Why don't you create an abstraction on it? An ICache interface with a clear method for instance. Then you can use an in memory cache for your integration testing.

BennyM