0

I'm researching the use of out of process caching in my ASP.NET web application. I'm looking for functionality that allows me to rebuild the cache from scratch without having the end user wait for it to rebuild. My application can take up to 2 minutes to rebuild the cache.

I'm thinking something along the lines of copying the existing cached values to a new location while the new cache values are populated. The application would use these copied values until the new values are populated.

Does AppFabric/NCache etc provide that kind of functionality out of the box? I can't find anything online about it.

Thanks

Peter
  • 309
  • 1
  • 10

1 Answers1

0

Maybe the best way not to affect application performance is do this action by something else.

An easy way to avoid this issue, is to use a periodic background async task to update the cache before an item will expire. 2 minutes to rebuild the cache is very long, maybe you could try to split your data items and use a bit of parrallel tasks.

In addition, there are two programming models in AppFabric Cache :

  • Cache aside : application must reload data into the cache from the original data source
  • Read Through/Write Behind : if an item is not in the cache, the provider retrieves it from the backend. When items are written to a cache, the written items are periodically and asynchronously written to the backend. Loot at this link.
Cybermaxs
  • 24,378
  • 8
  • 83
  • 112