We have multiple lookup tables in a SQL Server database. Tables are used in application dropdown menus.
AddressType:
- Home
- Business
ProductType:
- Books
- Food
- Electronics
Instead of continually reading database lookup tables, team wants to apply MemoryCache
or Redis Cache
(to reduce database load, and increase in-memory performance). However, we learned that Entity Framework Core DbContext
already has caching.
So in this case, would there be any value in caching looking tables, if after a certain amount of reads, the DbContext
does this already?
Would adding more caching code for MemoryCache/Redis
over DbContext
help? Or would it be an unnecessary layer?