Cache data processing method and device and storage medium
By listening to database access statements and combining transaction awareness mechanisms, cache failure events are generated, which solves the problem of consistency between cached data and database data, realizes data consistency across services and distributed caches, and simplifies the application and maintenance of cache mechanisms.
Patent Information
- Application Number
- CN202511093633.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-08-06
AI Technical Summary
In the prior art, the consistency between cached data and database data is difficult to guarantee, especially in complex business logic scenarios, the application of the cache mechanism is difficult to ensure the consistency of distributed caches. Data inconsistency often occurs in cross-service caches.
By listening to database access statements, cache invalidation events are generated in real time, and combined with transaction awareness mechanism, the cached data is updated after the database transaction is completed, and the event broadcaster and event processor are used to achieve data consistency across services and distributed caches.
It realizes that without changing the business logic of single-body application, ensures the consistency of cached data and database data, improves the data consistency of distributed and cross-service caches, and simplifies the application and maintenance of the cache mechanism.