Cache read-write method and terminal
A caching, reading and writing technology, applied in the field of caching, can solve problems such as memory data reading and writing conflicts, thread freezes, program crashes, etc., and achieve the effect of separating reading and writing and relieving the pressure of reading and writing
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0065] Please refer to figure 1 and Figure 3-4 , a method for caching reads and writes, including steps:
[0066] S1. Set up read-only cache, read-write cache and normal cache;
[0067] Specifically, the data types stored in the local memory are divided into three types: read-only cache, read-write cache, and common cache, and the common cache is the real data storage cache;
[0068] The read-only cache, read-write cache and common cache are all stored in the memory in the data structure mode of MAP;
[0069] S21. In the read scenario, if no corresponding data is queried in the read-only cache, query the read-write cache; if no corresponding data is queried in the read-write cache, query the normal cache, and updating the read-only cache and the read-write cache respectively with the data queried by the common cache;
[0070] Specifically, the client requests the interface API to obtain relevant data information, that is, sends a data request;
[0071] S211, the interfac...
Embodiment 2
[0084] The difference between this embodiment and embodiment one is:
[0085] The regular polling of the read-write cache in the step S3 is specifically:
[0086] The read-write cache is periodically polled by an independent asynchronous thread.
[0087] Specifically, for example, by polling the read-write cache at intervals of 30 seconds by an independent asynchronous thread, the read-write cache can be monitored without affecting original business logic and occupying resources.
Embodiment 3
[0089] Please refer to figure 2 , a terminal 1 for buffering read and write, including a memory 2, a processor 3, and a computer program stored on the memory 2 and operable on the processor 3, when the processor 3 executes the computer program, it implements Steps in Example 1.
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