How can you configure OutputCache in Asp .NET MVC 2 (with .NET 3.5) so that the cached data is stored in SQL database?
-
2would this not negate the reason for caching in the first place?dove– dove2011-01-25 11:55:02 +00:00Commented Jan 25, 2011 at 11:55
-
It depends. In my case the web application calls remote web service and every invocation takes up to 10 seconds.mgamer– mgamer2011-01-25 11:58:09 +00:00Commented Jan 25, 2011 at 11:58
-
would you not want to cache the results from the remote web service then rather then the output from your app?Sam Holder– Sam Holder2011-01-25 12:06:31 +00:00Commented Jan 25, 2011 at 12:06
-
@SamHolder, I absolutely agree with you but there are some conditions which force us to cache output from the web app rather than only the output from the remote web service. Thanks for your pertinent comments nonetheless.mgamer– mgamer2011-01-25 12:10:47 +00:00Commented Jan 25, 2011 at 12:10
Add a comment
|
1 Answer
This could be achieved in ASP.NET 4.0 where you can write a custom cache provider. Quote from this very same blog post:
One limitation of output caching with ASP.NET V1->V3.5, though, is that the cache store itself is not extensible – and the cached content always has to be stored in-memory.
Time to upgrade :-)