You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method MakeBaseKey cannot be changed, therefore, one cannot change how cache invalidation is applied.
In my case, baseKey should be Controller+Action+TenantId, and as it is, I cannot change that. My application is a multi-tenant app, so it shouldn't invalidate cache throughout tenants.
[HttpGet]
[Route("{id:guid}")]
public IHttpActionResult GetById([TenantId] Guid tenantId, Guid id)
[HttpPost]
[Route("")]
public IHttpActionResult Create([TenantId] Guid tenantId, Model model)
When a POST is issued, all cache of all tenants are invalidated, but it should only invalidate the current tenantId's caches
Possible Solution
Create a new method in ICacheKeyGeneratorstring MakeCacheBaseKey(HttpActionContext context) - verify which parameters can be passed.
Use this new method when generating BaseKeys
The text was updated successfully, but these errors were encountered:
The method MakeBaseKey cannot be changed, therefore, one cannot change how cache invalidation is applied.
In my case, baseKey should be
Controller+Action+TenantId
, and as it is, I cannot change that. My application is a multi-tenant app, so it shouldn't invalidate cache throughout tenants.When a
POST
is issued, all cache of all tenants are invalidated, but it should only invalidate the current tenantId's cachesPossible Solution
Create a new method in
ICacheKeyGenerator
string MakeCacheBaseKey(HttpActionContext context)
- verify which parameters can be passed.Use this new method when generating BaseKeys
The text was updated successfully, but these errors were encountered: