net MVC输出缓存存储在SQL db中

时间:2021-06-30 03:51:06

How can you configure OutputCache in Asp .NET MVC 2 (with .NET 3.5) so that the cached data is stored in SQL database?

如何在asp.net MVC 2中配置OutputCache(使用。net 3.5),使缓存的数据存储在SQL数据库中?

1 个解决方案

#1


1  

This could be achieved in ASP.NET 4.0 where you can write a custom cache provider. Quote from this very same blog post:

这可以在ASP中实现。NET 4.0可以编写自定义缓存提供程序。引用同样的博文:

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.

使用ASP进行输出缓存的一个限制。NET V1->V3.5是缓存存储本身不能扩展的,缓存的内容总是必须存储在内存中。

Time to upgrade :-)

升级时间:-)

#1


1  

This could be achieved in ASP.NET 4.0 where you can write a custom cache provider. Quote from this very same blog post:

这可以在ASP中实现。NET 4.0可以编写自定义缓存提供程序。引用同样的博文:

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.

使用ASP进行输出缓存的一个限制。NET V1->V3.5是缓存存储本身不能扩展的,缓存的内容总是必须存储在内存中。

Time to upgrade :-)

升级时间:-)