pratik patel

pratik patel

  • NA
  • 9
  • 2.3k

how to forcing(clear) cache expiration in ASP.NET?

Apr 9 2014 6:43 AM

Suppose I have an ASP.NET application running across several web servers behind a load balancer:

Can I:

  • Force OutputCache (Page and/or Control level) to expire globally?

  • Force Data Cache (i.e. Cache.Insert) to expire?

  • Monitor ASP.NET caching usage (keys, RAM, etc) from a central location?

One possible solution would be to have every usage of cache check a file dependency for changes. The file could be touched which would expire all cache. However, this requires developers to include the dependency in all their code. Is their a better solution?