IDistributedCache
IDistributedCache is a .NET interface that defines operations for storing and retrieving data through a distributed cache provider.
Building Web APIs with ASP.NET Core
IDistributedCache is the .NET abstraction for storing and retrieving cached data through an external distributed cache provider.
- How it is used
- Supports shared server-side caching for ASP.NET Core applications running across multiple web servers.
- How deep it goes
- Explains provider selection, registration, typed JSON extensions, dependency injection, cache keys, expiration, and controller usage.
- Examples
- Uses SQL Server configuration, DistributedCacheExtensions, and a MechanicsController cache around filtered and paged database results.
- What you can do after
- Apply it via ASP.NET Core dependency injection to configure a provider and cache serialized application results.
Read how Building Web APIs with ASP.NET Core explains IDistributedCache →
Pro ASP.NET Core 7, Tenth Edition
IDistributedCache is a .NET caching abstraction for storing and retrieving byte-array values shared across application requests and potentially across application instances.
- How it is used
- Caches calculated endpoint values across requests without binding the endpoint to a particular cache implementation.
- How deep it goes
- Works through lookup, write, expiry, implementation registration, and persistent SQL Server setup; does not examine cache-provider internals.
- Examples
- Uses a `/sum/{count}` endpoint, an in-memory cache, and a SQL Server cache table to make reuse and persistence observable.
- What you can do after
- Apply it via ASP.NET Core service registration and string cache methods to reuse calculated values and configure their expiry.
Read how Pro ASP.NET Core 7, Tenth Edition explains IDistributedCache →
What to know first
- bytesBytes are an ordered sequence of byte values, typically eight-bit units, used to represent binary data.
Related concepts
- AddDistributedMemoryCacheimplemented by · An ASP.NET Core service-registration method that configures an IDistributedCache implementation backed by memory.
- distributed cachingused by · Distributed caching is a technique for storing cached data across networked nodes so it can be accessed by multiple processes or application instances.
- middlewareused by · Middleware is software that mediates communication or processing between components, often by intercepting, transforming, or coordinating operations in a pipeline.
- bytesuses · Bytes are an ordered sequence of byte values, typically eight-bit units, used to represent binary data.
Questions about IDistributedCache
What is IDistributedCache?
IDistributedCache is a .NET interface that defines operations for storing and retrieving data through a distributed cache provider.
Which Manning books explain IDistributedCache?
Building Web APIs with ASP.NET Core and Pro ASP.NET Core 7, Tenth Edition.
What should I know before learning IDistributedCache?
Manning books that teach IDistributedCache usually introduce bytes first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

