Reputation: 15041
I'm experienced with ASP.NET but some of my knowledge is a little shaky. I'm creating an application that uses services to get large portions of data. I then want to filter it with LINQ to what I need. This data rarely changes, but I know there's too much of it to fit in Session.
How can I store rarely-changing , large amounts of data in memory? Would this be suitable for Application variables?
Upvotes: 3
Views: 1267
Reputation: 1786
Instead of caching the source data, consider using HTTP caching via ASP.NET Output Cache or memcached to store the rendered output itself. ASP.NET OutputCache can be tuned to work on specific ASP.NET resources and there are many ways to invalidate the cache explicitly if need be. See the following MSDN resources for more information.
OutputCache Attribute for ASP.NET MVC
Upvotes: 1
Reputation: 150238
You can store large amounts of fairly static data:
HttpContext.Cache
Pro's
Con's
Static Field
Pro's
Con's
Upvotes: 1