Unlock instant, AI-driven research and patent intelligence for your innovation.

Implementation and generation methods and systems for server cache

A technology of server cache and server system, applied in the field of generation method and system, and realization of server cache

Inactive Publication Date: 2016-11-16
NUBIA TECHNOLOGY CO LTD
View PDF10 Cites 11 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The main purpose of the present invention is to propose a server cache implementation, generation method and system, aiming at solving the problem of cache emptying waiting time

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
  • Implementation and generation methods and systems for server cache
  • Implementation and generation methods and systems for server cache
  • Implementation and generation methods and systems for server cache

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0041] It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0042] Such as figure 1 As shown, it is a flow chart of a method for implementing server cache provided by Embodiment 1 of the present invention. The method specifically includes:

[0043] Step S101, call the interface in the server system, obtain the interface name and parameter value as a key value, generate a result data as a cache value, add a cache validity period field to the cache value, and put the key value and cache value together In the hash table;

[0044] As an embodiment, take the Redis cache server as an example, the data structure of Redis is key (key value)-value (value) format, in fact, both key and value will be stored in the format of binary word stream in Redis cache server .

[0045] As an embodiment, a hash table is used to store the cache of the server. The name of the hash table is API_HASH...

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 discloses an implementation method for a server cache. The method includes the steps that an interface is called from a server system, the name and parameter values of the interface are acquired and serve as key values, result data is generated to serve as cache values, cache period-of-validity fields are added into the cache values, and the key values and the cache values are put in a Hash table; when the server cache is read, period-of-validity fields of the cache are acquired, whether the cache values are within the period of validity or not is judged, and if yes, the content of the cache values is acquired; if not, cache data is regenerated. The invention further discloses a generation method and an implementation system for the server cache. By means of the technical scheme, when a large amount of cache data is emptied, it is only needed to delete the Hash table without traversing to delete each key value pair, thus, consumed time is shortened to several milliseconds from several minutes in the original art, and it is guaranteed that the user experience is not affected while the performance of a server is improved.

Description

technical field [0001] The present invention relates to the server field, in particular to a method and system for realizing and generating server cache. Background technique [0002] In server systems, especially for Redis-based server types, each interface call will generate a result, and each result corresponds to a piece of cached data. The cache data uses the key-value pairs provided by Redis. When generating each piece of cached data, set its valid time. If the cached data exceeds the valid time, the Redis cache will automatically set the data as invalid. [0003] In the above server system, if the cache needs to be cleared, it is necessary to traverse and delete each key-value pair. But as more and more cached data, correspondingly more and more key-value pairs, clearing the cache will become slower and slower. When there is a large-scale data change, it is necessary to clear the cache. In the process of completing large-scale data changes, the waiting time will b...

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/54
CPCG06F9/544
Inventor 倪秉炬
Owner NUBIA TECHNOLOGY CO LTD