Open Closed

Implement Redis Cache #2977


User avatar
0
krushnakant created

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: v4.4.0
  • UI type: MVC/ Razor Pages
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • I have used Distributed caching mechanism of abp in my project (IDistributedCache Interface). How can i use Redis server for the same caching mechanism?
  • Steps to reproduce the issue:"

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

    hi

    Check this https://docs.abp.io/en/abp/latest/Redis-Cache

  • User Avatar
    0
    krushnakant created

    According to this document Volo.Abp.Caching.StackExchangeRedis is already in my web.public project, but if i want to include Abp.RedisCache in my web project also it gives errors in my development.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Abp.RedisCache belongs aspnetboilerplate, Volo.Abp.Caching.StackExchangeRedis is ABP.IO. they can't use together.

  • User Avatar
    0
    krushnakant created

    Ok, So if i use context.Services.AddStackExchangeRedisCache(options => { options.Configuration = "localhost:6379"; }); in my web module.cs file in ConfigureServices it gives me result items on monitor command in redis cli while execute GetOrAddAsync method in app service. And for that i have to run redis server compulsory while running my web project. If i don't use this, in monitoring redis cli i can't get cached items but can run my web project without running redis server dependency. Is there any option that how can i see cached items in monitoring redis cli.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I'm not familiar with the redis cli.

    GetOrAddAsync will read or write the Redis.

  • User Avatar
    0
    krushnakant created

    Ok, Thank you for support.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You're welcome.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11