CachingCallHandler using WebCache?

Topics: Caching Application Block
Oct 15, 2009 at 7:50 PM
Edited Oct 15, 2009 at 7:52 PM

In the new V5 will the CachingCallHandler be using the CacheManager Block and not the HttpRuntime.Cache ?  In the mean time I did create my own class, but it would be nice that Framework use it's own caching mecanism...  Maybe the CachingCallHandler should be named "WebCachingCallHandler" .

public class CachingCallHandler : ICallHandler

 public IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
       //  other code removed ...

    object[] objArray2 = (object[]) HttpRuntime.Cache.Get(key);

       //  other code removed ...


Oct 16, 2009 at 1:39 AM

Hi Robert, I don't think so as I didn't see this as part of the current product backlog for version 5.


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.

Oct 16, 2009 at 4:35 PM

The caching block is really designed for persistent caching scenarios. The way we see the caching handler used, on the other hand, is primarily transient; keep it in memory, but we don't have to store the contents across runs. That's why we're using the web cache; it's tons faster becuase it can be purely in memory. Using the caching block would cause the cost of caching itself to grow significantly.

If you have a different scenario it's not that hard to write your own handler.