Cache data updating method and device
A technology for caching data and updating methods, applied in the field of data processing, can solve the problems of database paralysis, difficult maintenance, bloated code, etc., to achieve the effect of improving security, reducing the amount of calculation, and avoiding performance bottlenecks
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment approach
[0069] When step 201 is specifically implemented, when the data in the cache needs to be updated, the identifier of the cache data to be updated is added to the queue. In order to update the data in the cache in a timely manner and improve the validity of the data in the cache, in the embodiment of the present invention, the identifier of the cache data to be updated is added to the queue, including the following two implementation modes, specifically:
Embodiment approach 1
[0070] Embodiment 1. When writing the target data into the database, the identifier of the target data is added as the identifier of the cache data to be updated to the queue for storing the cache data information to be updated.
[0071]In this embodiment, when data is written into the database, the identifier of the data is added to the queue as the identifier of the cache data to be updated at the same time, and when the identifier of the cache data to be updated in the queue is written, it is triggered to acquire the The identification of the data, and query the data from the database according to the acquired identification of the cached data to be updated, and update the data corresponding to the identification of the cached data to be updated in the cache, so that when the data is written into the database, the data in the cache is updated in time , to improve the validity of data in the cache.
Embodiment approach 2
[0072] Embodiment 2: When the target data is queried in the cache and the target data is not queried, the identifier of the target data is added as the identifier of the cache data to be updated to the queue for storing information of the cache data to be updated.
[0073] In this embodiment, when the data is queried in the cache and the data is not queried, the identifier of the data is added to the queue as the identifier of the cached data to be updated, and when the identifier of the cached data to be updated in the queue is written, it is triggered to obtain from the queue The identifier of the cached data to be updated, and query data from the database according to the acquired identifier of the cached data to be updated, and update the data corresponding to the identifier of the cached data to be updated in the cache, thereby updating the data in the cache in time, so that the next time from When the same data is queried in the cache, the data can be queried, and in the ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com