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 SQL Server. I'll probably go with LINQ to SQL or maybe Entity Framework. Are there design decisions I need to make now for caching, or is it easy enough to start using Velocity if that becomes necessary? Just to be clear, I'm talking about Microsoft's Velocity cache and not the Apache Velocity template engine.
I'm hoping that I can ignore caching for the moment, because learning C#, ASP.NET MVC, LINQ, IIS, SQL Server, and becoming proficient in VS is keeping my plate full.
Stephen Walther has a great article on how to do this
ASP.NET MVC Tip #39 – Use the Velocity Distributed Cache
dswatik provided a great link on how to use it.
I'd suggest adding this functionality somewhere in your Repository/Service layer to take the burden off of the application and to stay within the DRY principle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With