Adding cache layer to N-tier application instead of calling database multiple times in ASP.NET Core 5

177 Views Asked by At

In an n-tier application, in the business layer, I need to read database entities multiple times for validation purposes, so I decide to add caching layer to reduce the round trips to the database to fetch the data that will rarely change, my question is where the caching layer should be added, or how the architecture should be, to add caching layer without changing the whole architecture ( n-tier )

The layers:

API layer
   ||
Business Layer
   ||
Database Layer 

Any recommendations or examples I can follow?

0

There are 0 best solutions below