Starts in:
1 DAY
3 HRS
1 MIN
39 SEC
Starts in:
1 D
3 H
1 M
39 S
Open Closed

how can I set and get data by using redis cache #4345


User avatar
0
ElifKaya created

Hello,

I used SignalR and I want to use redis as a backplane. But I don't want to use both together, so I didn't use like that.

I want to keep message in redis as separately, then I will control remove message from cache according to my condition. I mean, I configured redis option and tried to use redis cache with IDistributedCache. Is it possible, or how can I set and get data to redis cache?

Now, I can not see my message in redis but I could send message by using IDistributedCache.

Thanks

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.3.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I suggest you do this.

    but I could send message by using IDistributedCache.

    Can you share some code?

  • User Avatar
    0
    ElifKaya created

    hi

    I suggest you do this.

    but I could send message by using IDistributedCache.

    Can you share some code?

    I want to use redis cache with IDistributedCache. And I want to manage cache data to add, remove notification operation.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I want to use redis cache with IDistributedCache.

    There will be no problem using Redis with IDistributedCache.

    And I want to manage cache data to add, remove notification operation.

    Redis as a backplane and use IDistributedCache to manage messages, I think there may be problems. This is not recommended.

  • User Avatar
    0
    ElifKaya created

    I want to use redis cache with IDistributedCache.

    There will be no problem using Redis with IDistributedCache.

    And I want to manage cache data to add, remove notification operation.

    Redis as a backplane and use IDistributedCache to manage messages, I think there may be problems. This is not recommended.

    But, when I add to data to IDistributedCache, I can not see this data on Redis. So, How I can user redis with IDistributedCache. I configured redis according to abp document. Actually, this was my first question at the top of the page.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    When you directly or indirectly reference the AbpCachingStackExchangeRedisModule module, Redis is used by default.

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo/Abp/Caching/StackExchangeRedis/AbpCachingStackExchangeRedisModule.cs#L21

    https://docs.abp.io/en/abp/latest/Redis-Cache#configuration

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06