Method and device for updating buffer memory, buffering equipment and storage medium
An update method and storage medium technology, applied in the storage field, can solve problems such as low utilization rate of non-consistent cache technology, no solution given, poor stability, etc., to achieve enhanced cache resource utilization, enhanced stability, and release of resources Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0056] An embodiment of the present invention provides a cache update method, such as figure 1 As shown, the method includes:
[0057] S101, receiving a data request;
[0058] S102, judging whether there is a corresponding trigger mark in the cached data corresponding to the data request;
[0059] S103. When it does not exist, record the trigger mark, update the cache according to the data source corresponding to the data request, and delete the trigger mark after the update.
[0060]The methods in the embodiments of the present invention can be executed in electronic devices such as servers, desktop computers, and mobile terminals. The trigger flag can also be described as a flag, trigger flag, flag, etc., and is used to indicate whether the cached data is being updated by other threads or tasks. For example, there is a trigger flag, if any, so that the current cache update can be aborted / stopped / ended. The way to update cache includes but not limited to synchronous updat...
Embodiment 2
[0070] An embodiment of the present invention provides a cache update method, such as figure 2 As shown, the method includes:
[0071] S201, receiving a data request;
[0072] S202, read cache;
[0073] S203, judging whether the cached data corresponding to the data request hits the cached data in the cache; if yes, execute S207; if not, execute S204.
[0074] S204, read the data source;
[0075] S205, updating the cache according to the read data source;
[0076] S206. Respond to the data request and return cached data.
[0077] S207, if it hits, perform a trigger update cache; including judging whether the trigger mark exists; if not, record the trigger mark, and update the cache according to the data source corresponding to the data request, and update After the end, the trigger mark is deleted, and then S206 is executed.
[0078] The embodiment of the present invention uses a trigger mark to update the cache, which can effectively reduce the instantaneous peak value...
Embodiment 3
[0096] An embodiment of the present invention provides a cache update method, specifically the trigger-type asynchronous update cache process involved in the cache update method provided in Embodiment 1 and Embodiment 2. The process includes:
[0097] S301, update request;
[0098] S302, acquiring the expiration time of the cache;
[0099] S303, judging whether the failure duration is less than the duration threshold; if yes, execute S304, if not, execute S306;
[0100] S306, the update cache ends;
[0101] S304, read the trigger mark;
[0102] S305, judging whether the trigger flag exists; if there is, execute S306, if not, execute S307;
[0103] S307, record the trigger mark;
[0104] S308, read the data source corresponding to the update request;
[0105] S309, updating the cache according to the data source;
[0106] S310, delete the trigger mark after the update; execute S306.
[0107] Among them such as image 3 As shown, the trigger updates of S302-S310 enclosed...
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