Using GlobalFilters to cache invalidation is a good idea?
I am using ASP.NET MVC and EF.

To do cache invalidation I override the SaveChanges method and every time that SaveChanges is called, I update a field in database to flag that something changed.(I am using database to works with WebFarm scenario).

To clear the cache, I need to only query this field on database, if it is different from a static variable in C#, I clear the cache.

At first try, I called this method in BeginRequest, but BeginRequest is called for all request, including images.

Now I thinking if GlobalFilter is a good ideia, what do you think?

Thanks.
Using GlobalFilters to cache invalidation is a good idea?
===

I am using ASP.NET MVC and EF.

To do cache invalidation I override the SaveChanges method and every time that SaveChanges is called, I update a field in database to flag that something changed.(I am using database to works with WebFarm scenario).

To clear the cache, I need to only query this field on database, if it is different from a static variable in C#, I clear the cache.

At first try, I called this method in BeginRequest, but BeginRequest is called for all request, including images.

Now I thinking if GlobalFilter is a good ideia, what do you think?

Thanks.