question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add posibility to Custom prefix keys in AbpRedisCache

See original GitHub issue

Hi. We would like to had possibility to configure prefix on appsettings level for AbpRedisCache. Issue which we had right now is that we had 3 different environment Production, Staging and Test and in our case it is unecessary and additional cost to setup 3 redis, but when it will be possibile to make custom prefixes inside AbpRedisCache, then we could reuse one instance for all environment. protected virtual RedisKey GetLocalizedRedisKey(string key) { return "n:" + Name + ",c:" + key; } Most anoying issue with approach which is right now is, if we introduce new setting in our staging then it could occur 500 on GetAll method on production, cause on production, setting is not yet introduce. This is very dangerous and this small feature could give better usability of redis in aspboilerplate.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ryancyqcommented, Sep 1, 2020

@CrazyBaran you should consider using different database id in the same Redis instance (which can be configured in the environment specific app settings

Configuration.Caching.UseRedis(options =>
{
    options.ConnectionString = _appConfiguration["RedisCache:ConnectionString"];
    options.DatabaseId = _appConfiguration.GetValue<int>("RedisCache:DatabaseId");
});
0reactions
stale[bot]commented, Oct 31, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Caching | Documentation Center | ABP.IO
It automatically adds a cache name prefix to the cache keys based on the object type stored in the cache. Default cache name...
Read more >
Deployment/Configuring Production - ABP Documentation
ABP's distributed cache infrastructure provides an option to set a key prefix for all of your data that is saved into your distributed...
Read more >
Distributed Cache (redis) prefix keys - asp.net core
I'm trying to use shared redis instance as a distributed cache for multiple aspnetcore services. My first idea was to simply prefix cache...
Read more >
Client-side caching in Redis
Clients enable client-side caching using the BCAST option, specifying one or more prefixes using the PREFIX option. · The server does not store...
Read more >
Untitled
Azure Cache for Redis Terraform module - GitHub How to get the data/value size in Redis keys with prefix? laravel redis cache prefix-掘金 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found