Cache breakdown prevention method and annotation component thereof

A caching and annotation technology, applied in the direction of program synchronization, inter-program communication, program control design, etc., can solve problems such as cumbersome development and configuration, database downtime, and non-prevention of cache breakdown, so as to avoid a large number of concurrent requests from directly dropping into the database, The effect of reducing granularity and avoiding cache breakdown

Inactive Publication Date: 2020-02-07
北京云杉世界信息技术有限公司
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1) It does not prevent cache breakdown. When the cache fails, a large number of concurrent requests are directly dropped into the database, causing the database to go down;
[0005] 2) For all needs, there are many required functions, and the development and configuration are cumbersome;

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Cache breakdown prevention method and annotation component thereof
  • Cache breakdown prevention method and annotation component thereof

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0044] The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the related application, not to limit the application. In addition, it should be noted that, for ease of description, only parts relevant to the present application are shown in the drawings.

[0045] Attached below Figure 1 to Figure 2 The application is described in further detail.

[0046] On the one hand, an embodiment of the present application provides a method for preventing cache breakdown, including the following steps:

[0047] Parsing step: parse the query request to get the key;

[0048] Judging step: judging whether the corresponding data of the Key exists in the cache;

[0049] Reading step: If the corresponding data of the Key exists in the cache, return the corresponding data;

[0050] If the corresponding data of Key does not exist in t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a cache breakdown prevention method which comprises the following steps: an analysis step: analyzing a query request to obtain a key; a judgment step: judging whether data corresponding to the Key exists in the cache or not; a reading step: if the corresponding data of the Key exists in the cache, returning the corresponding data; and if not, locking the Key, executing a group of database read-write operations after successful locking, writing the results of the group of database read-write operations into the cache, removing the lock, and returning the results in thecache. Furthermore, the invention also relates to an annotation component for preventing cache breakdown, which comprises an analysis unit for analyzing the query request to obtain a key; a judging unit used for judging whether data corresponding to the Key exists in the cache or not; and a reading unit used for returning the corresponding data if the corresponding data of the Key exists in the cache; and if not, locking the Key, executing a group of database read-write operations after successful locking, writing the results of the group of database read-write operations into the cache, removing the lock, and returning the results in the cache.

Description

technical field [0001] The present application belongs to the technical field of anti-cache breakdown design, and in particular relates to an anti-cache breakdown method and an annotation component thereof. Background technique [0002] The cache annotation component annotates the business methods that require cache services in an aspect-oriented way to realize cache read and write, so that developers can use cache services transparently without paying attention to cache-related development, so that they can focus on business development. [0003] Spring 3.x provides caching-related annotations, which can implement aspect-oriented caching services. It has the following disadvantages: [0004] 1) It does not prevent cache breakdown. When the cache fails, a large number of concurrent requests are directly dropped into the database, causing the database to go down; [0005] 2) For all needs, there are many required functions, and the development and configuration are cumbersom...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/52G06F9/54G06F16/2455
CPCG06F9/524G06F9/544G06F16/24552
Inventor 石永明
Owner 北京云杉世界信息技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products