Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Caching Per Tenant #4152


User avatar
0
pankajmathur created

Hi,

I am using the default in-memory caching that is available in your framework. The question is: Is Caching happens per tenant or it will be shared among tenants. My observation is it is getting shared among tenant. If that's the default behavior, whats the best way to achieve caching per tenant?

Regards, Mahendra


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @pankajmathur,

    Yes, it is shared between tenants. You can simply add tenantId or tenancyName as a prefix for your cache key.

    For example it would be "1_UsersCache" or "DefaultTenant_UsersCache".

  • User Avatar
    0
    pankajmathur created

    Thanks for the suggestion, we are now implementing the same.