How to design an ASP.NET MVC site for caching with Velocity?

后端 未结 4 505
离开以前
离开以前 2021-02-01 11:03

I\'m coming from the LAMP world, where the \"cache everything\" mentality is prevalent. Everything is put in memcache.

I\'m starting a new project with ASP.NET MVC and

4条回答
  •  梦毁少年i
    2021-02-01 11:53

    The selected answer is for the Velocity CTP1. Here is the MSDN link for the latest Velocity Programming Guide.

    As to your other question about design decisions, Chad Moran's suggestion to put the onus on the repository layer is great. Then, I would look at adding support for linq caching using a technique similar to the one described here: http://petemontgomery.wordpress.com/2008/08/07/caching-the-results-of-linq-queries/

    You would obviously have to write an implementation that uses Velocity instead of the ASP.NET Cache ... but really, unless you have statistics to prove that you need something like Velocity, you can probably stick with the regular cache until it becomes a problem. If you listen to some of the talks that Joel Spolsky has given regarding stackoverflow, you'll find that two boxes (one with iis, and the other with sql server) can handle a very high volume.

提交回复
热议问题