Base solution for your next web application
Open Closed

Redis Configuration Error : Could not instantiate Abp.Runtime.Caching.Redis.AbpRedisCache #11836


User avatar
0
huntethan89 created

Hi,

I have done all the configurations to enable redis in AspNetZero Core project as per the docs. I am using latest version of Net Zero. I am getting the errors while starting project. Below are the screenshots of the error and the configurations.

Error

appsettings configurations

Enabling redis in startup.cs


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

    Hi @huntethan89

    Are you able to connect to this database using another tool ? Redis CLI for example ?

  • User Avatar
    0
    huntethan89 created

    Hi,

    Thanks for your quick response. It's working now, there was an issue with the Redis server running in background. I want to save the data on Redis server or cloud but I am not able to save the data on Redis server using Net Zero in-built cache manager. I have also tried with AbpPerRequestRedisCacheManager. Could you please let me know whether the project has in-built functions or interface to save data in Redis server or we need to implement it on our own?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can use ICacheManager to get a cache and set any item into it. For example;

    _cacheManager.GetCache("AbpLocalizationScripts").Set("Key", "Value")