Ends in:
7 DAYS
10 HRS
28 MIN
16 SEC
Ends in:
7 D
10 H
28 M
16 S
Open Closed

How to Implement Service Calls for Redis Cache Refresh (Custom Service) on Organization Unit CRUD Operations? #8337


User avatar
0
Buckoge created
  • ABP Framework version: v9.0.0
  • UI Type: MVC
  • Database System: PostgreSQL
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I need guidance on implementing service calls (in either C# or JavaScript) to refresh the Redis cache via a custom service during CRUD operations on Organization Units. Specifically, I want to ensure that the cache is updated whenever:

An Organization Unit is created, updated, or removed. Users or Roles are added to or removed from an Organization Unit.

Additionally, I need a solution that allows me to call this service on submit, ensuring that it is triggered regardless of the specific operation or context (e.g., adding/removing users or roles, modifying organization unit details, etc.).

What would be the best approach to create such service calls?

I would appreciate explanations, examples, or references to relevant resources to implement this solution effectively.

Thanks.


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    you can use event handler:

    https://abp.io/docs/latest/framework/infrastructure/event-bus/local#pre-built-events https://abp.io/docs/latest/framework/infrastructure/event-bus/distributed#pre-defined-events

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