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

Abp Cache Key Names #9159


User avatar
0
tom.ohle created

We are looking into using a shared redis cache server between several aspnetzero applications. We would be using a microservice to update some of the cache values so the information would remain the same for all of these applications.

The issue we're seeing with this approach is that each aspnetzero application uses a standard cache names for certain things ie (AbpZeroUserPermission, AbpZeroRolePermissions, AbpZeroLanguages, etc..)

Is there a way to alter these cache names or override them in some manner to give them a prefix of some sort so they would be unique accross all applications that would share the cache?


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

    hi

    When you use Redis, you can try to override the GetLocalizedRedisKey method to specify the prefix.

    https://github.com/aspnetboilerplate/aspnetboilerplate/blob/d32b30f00cc3b17813e803bcee83a165a3aae0cc/src/Abp.RedisCache/Runtime/Caching/Redis/AbpRedisCache.cs#L178

  • User Avatar
    0
    tom.ohle created

    ok thanks that does look like what we've been looking for