How to cache data in a MVC application

后端 未结 14 1130
鱼传尺愫
鱼传尺愫 2020-11-22 11:39

I have read lots of information about page caching and partial page caching in a MVC application. However, I would like to know how you would cache data.

In my scena

相关标签:
14条回答
  • 2020-11-22 12:29

    AppFabric Caching is distributed and an in-memory caching technic that stores data in key-value pairs using physical memory across multiple servers. AppFabric provides performance and scalability improvements for .NET Framework applications. Concepts and Architecture

    0 讨论(0)
  • 2020-11-22 12:30

    You can also try and use the caching built into ASP MVC:

    Add the following attribute to the controller method you'd like to cache:

    [OutputCache(Duration=10)]
    

    In this case the ActionResult of this will be cached for 10 seconds.

    More on this here

    0 讨论(0)
提交回复
热议问题