Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET 4 Caching Support

Tags:

c#

.net

caching

I understand the .NET 4 Framework has caching support built into it. Does anyone have any experience with this, or could provide good resources to learn more about this?

I am referring to the caching of objects (entities primarily) in memory, and probably the use of System.Runtime.Caching.

like image 805
Hosea146 Avatar asked May 12 '11 13:05

Hosea146


People also ask

How do I cache data in .NET Core?

ASP.NET Core supports several different caches. The simplest cache is based on the IMemoryCache. IMemoryCache represents a cache stored in the memory of the web server. Apps running on a server farm (multiple servers) should ensure sessions are sticky when using the in-memory cache.

What are the different caching techniques available in .NET Core?

ASP.NET Core supports two types of caching out of the box: In-Memory Caching – This stores data on the application server memory. Distributed Caching – This stores data on an external service that multiple application servers can share.


1 Answers

I assume you are getting at this, System.Runtime.Caching, similar to the System.Web.Caching and in a more general namespace.

See http://deanhume.com/Home/BlogPost/object-caching----net-4/37

and on the stack,

is-there-some-sort-of-cachedependency-in-system-runtime-caching and,

performance-of-system-runtime-caching.

Could be useful.

like image 120
Jodrell Avatar answered Oct 09 '22 10:10

Jodrell