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.

CN120596536AActive Publication Date: 2025-09-05HUNDSUN TECH
8 Cites 0 Cited by

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

Technical Problem

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.

Method used

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.

Benefits of technology

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.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention provides a cache data processing method and device and a storage medium, and the method comprises the steps: a data operation interceptor obtains a database access statement in real time, and if the execution of the database access statement causes the database change, generates a cache failure event according to the database access statement, the cache failure event is sent to the transaction aware event scheduler, the transaction aware event scheduler monitors a database transaction corresponding to a database access statement in real time, sends the cache failure event to the event broadcaster, and sends transaction execution information to the event broadcaster according to an execution result of the database transaction; and the event broadcaster temporarily stores the cache failure event and determines whether to send the cache failure event to the event processor according to the transaction execution information, and the event processor performs cache data updating according to the cache failure event after receiving the cache failure event. According to the method and the device, decoupling of the business logic and the cache mechanism can be realized, and the consistency of the database data and the cache data is ensured.
Need to check novelty before this filing date? Find Prior Art