Reference Data Cache
Reference data is typically read far more often than it changes. For example, customer profiles, product catalogs, branch information, lookup tables, and configuration data. Caching this data in NCache reduces database load, improves response times, and enables applications to serve frequently requested information directly from the distributed cache.
The NCache EF Core provider offers two APIs for working with reference data:
- LoadIntoCache: Pre-loads data from the database into the cache.
- FromCacheOnly: Queries entities that already exist in the cache without accessing the database.
Together, these APIs enable a cache-first approach where data is loaded into the cache ahead of time and subsequently served directly from memory. This section details the usage of each of these APIS.
In This Section
LoadIntoCache
Learn how to use LoadIntoCache in EF Core to reduce database load, improve response times, and enable applications to serve frequently requested information directly from the distributed cache.
FromCacheOnly
Learn how to use FromCacheOnly in EF Core to reduce database load, improve response times, and enable applications to serve frequently requested information directly from the distributed cache.