3

We managed to use the App Fabric Caching Server for storing our Outputcache, without changing our code, only with configuration. And it's working very well.

Is there any way to do the same with the .Net Cache (HttpContext.Current.Cache) ? without changing our code, only config.

Thanks

SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
remi bourgarel
  • 9,231
  • 4
  • 40
  • 73
  • 1
    I see that this is possible for `Session` but nor for `Cache`, at least doesn't seem to me like a matter of modifying the `Web.config`. See here: http://msdn.microsoft.com/en-us/library/ee790859.aspx – Icarus May 10 '12 at 16:10

1 Answers1

0

There is no provider abstraction (ProviderBase) for the HttpContext Cache. There is for OutputCache and Session as indicated by @Icarus. It will require changing code.

Here are a couple ideas for you...

  1. Use AppFabric DataCache instead of HttpContext.Current.Cache. See Hanselmans example.
  2. Convert anything using HttpContext Cache (Application Cache) to Session (User Cache).
  3. See related SO post regarding building a custom Cache provider.
Community
  • 1
  • 1
SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173