What caching strategy do you use for a Database dependant ASP.NET App?

孤人 提交于 2020-01-15 10:48:10

问题


I'm looking for a good caching strategy for an CRM App written in ASP.NET. Almost all sites depend heavily on the database, which means caching parts/the whole page for some time does not work in my situation. Is there any other way you use caching in these situations?

UPDATE 1: The setup is the following: - ASP.NET App hosted on IIS - App uses either Entity Framework or nHibernate as OR Mapper as Data Access technology - which ever technology has more advantages for my specific requirements - SQL Server 2008


回答1:


We use caching for reference data that populates combo boxes and other fields(e.g. help fields) and any values that are unlikely to change frequently.

There are different levels of caching that are stored for different periods of time, including: Session (lifetime of the session) Application (lifetime of the web service)




回答2:


What database engine?

For SQL Server, have you looked at SqlCacheDependency? Allows you to retain data sets and provides a cache invalidation mechanism based on notifications from the server. See The Mysterious Notification for an explanation how it works.



来源:https://stackoverflow.com/questions/1286456/what-caching-strategy-do-you-use-for-a-database-dependant-asp-net-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!