CN101887396A - Method for realizing configurable cache - Google Patents

Method for realizing configurable cache Download PDF

Info

Publication number
CN101887396A
CN101887396A CN2009100840855A CN200910084085A CN101887396A CN 101887396 A CN101887396 A CN 101887396A CN 2009100840855 A CN2009100840855 A CN 2009100840855A CN 200910084085 A CN200910084085 A CN 200910084085A CN 101887396 A CN101887396 A CN 101887396A
Authority
CN
China
Prior art keywords
cache
buffer memory
configuration
key
expired
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2009100840855A
Other languages
Chinese (zh)
Inventor
刘立军
王磊
张守文
陶勇胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HUIXIONG (BEIJING) TECHNOLOGY Co Ltd
Original Assignee
HUIXIONG (BEIJING) TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HUIXIONG (BEIJING) TECHNOLOGY Co Ltd filed Critical HUIXIONG (BEIJING) TECHNOLOGY Co Ltd
Priority to CN2009100840855A priority Critical patent/CN101887396A/en
Publication of CN101887396A publication Critical patent/CN101887396A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention discloses a method for realizing configurable cache. The method comprises the following steps of: configuring cache overdue duration information in a database or a cache configuration file; loading the cache overdue duration configuration information into a cache configuration processor when a server is started; realizing each specific cache entry in a category, taking the full name of the category as a Key when the cache entry is added into the cache and reading the overdue duration of the cache from the cache configuration processor according to the key; and finally amending time setting corresponding to the full name of the cache category in the database or the configuration file only when the overdue duration of a certain cache needs to be amended. By the method, the application service can flexibly adjust the refresh frequency of the cache entry according to actual conditions when gaining benefit from the high performance of the memory cache.

Description

A kind of method that realizes configurable cache
Technical field
The present invention relates to a kind of method that realizes configurable cache, particularly a kind of method that realizes the buffer memory of configurable expired duration.
Background technology
Because than the high order of magnitude of efficient of database I/O, memory cache is application service system a kind of method that improves performance commonly used to the efficient of calculator memory I/O at least.But this buffer memory often accessed data that seldom are modified reads in information in advance to internal memory from data sources such as database or file system, to directly from internal memory, read these information of application access the time like this and do not produce database I/O operation, this will improve the application service performance to a great extent, especially concurrent than in higher.
Use buffer memory to bring a spinoff also: the modification of data can not be reflected in the memory cache at once.Because application cache generally will be specified the expired duration of this data item in data source loading data item, in case expired just reload.And this expired duration be appointed as much to come according to concrete business demand fixed, if so this time is write extremely in code, that will bring some inconvenience to service operation flexibly, and best bet is: make the expired duration of memory cache configurable and can adjust flexibly.
Summary of the invention
Technical matters to be solved by this invention provides a kind of method that realizes configurable cache, and it can carry out flexible configuration to the expired duration of buffer memory, is convenient at any time the expired strategy of buffer memory be adjusted according to actual conditions.
A kind of method that realizes configurable cache of the present invention, this method comprises following step at least:
Step 1: the expired duration information of buffer memory is configured in database or the cached configuration file.Configuration information only comprises two fields: Key and minute to be the time span of unit, and the corresponding concrete buffer memory of each key is realized full name of class;
Step 2: server is when starting, the expired duration configuration information of buffer memory is loaded in the cached configuration processor, this processor itself also is a buffer memory, it adds the expired duration configuration of buffer memory in the cache entry to, and expired time is appointed as 1 minute, like this, the expired duration configuration information of buffer memory will refresh once every 1 minute;
Step 3: each concrete cache entry realizes with a class, and when adding to cache entry in the buffer memory, as Key, the expired duration of buffer memory can read from the buffer memory configuration processor according to this key with this type of full name;
Step 4: when needs are revised the expired duration of certain buffer memory, only need in database or configuration file, revise the setting of this cache class full name time corresponding;
A kind of method that realizes configurable cache that the present invention relates to, it can realize the expired duration of buffer memory is carried out flexible configuration, the expired duration configuration information that modification finishes will come into force after 1 minute, concrete cache entry next time will be as the criterion with the expired duration of new configuration when expired, make application service when the high-performance of memory cache is benefited like this, also can adjust flexibly the refreshing frequency of cache entry according to actual conditions.
Embodiment
Key step of the present invention is as follows:
Step 1: the expired duration information of buffer memory is configured in database or the cached configuration file.Configuration information only comprises two fields: Key and minute to be the time span of unit, and the corresponding concrete buffer memory of each key is realized full name of class;
Step 2: server is when starting, the expired duration configuration information of buffer memory is loaded in the cached configuration processor, this processor itself also is a buffer memory, and it adds the expired duration configuration of buffer memory in the cache entry to, and expired time is appointed as 1 minute;
Step 3: each concrete cache entry realizes with a class, when adding to cache entry in the buffer memory, with this type of full name as Key;
Step 4: when needs are revised the expired duration of certain buffer memory, only need in database or configuration file, revise the setting of this cache class full name time corresponding;
When above-mentioned technical scheme is implemented, the expired duration of concrete buffer memory can carry out flexible configuration, the expired duration configuration information that modification finishes will come into force after 1 minute, concrete cache entry next time will be as the criterion with the expired duration of new configuration when expired, make application service when the high-performance of memory cache is benefited like this, also can adjust flexibly the refreshing frequency of cache entry according to actual conditions.
It should be noted last that above embodiment is only in order to explanation and unrestricted technical scheme described in the invention; Therefore, although this instructions has been described in detail the present invention with reference to the above embodiments,, those of ordinary skill in the art should be appreciated that still and can make amendment or replacement to the present invention with being equal to; And all do not break away from the technical scheme and the improvement thereof of the spirit and scope of the present invention, and it all should be encompassed in the middle of the claim scope of the present invention.

Claims (1)

1. method that realizes configurable cache, it is characterized in that: this method comprises following step at least:
Step 1: the expired duration information of buffer memory is configured in database or the cached configuration file.Configuration information only comprises two fields: Key and minute to be the time span of unit, the corresponding concrete buffer memory of each key is realized full name of class.
Step 2: server is when starting, the expired duration configuration information of buffer memory is loaded in the cached configuration processor, this processor itself also is a buffer memory, it adds the expired duration configuration of buffer memory in the cache entry to, and expired time is appointed as 1 minute, like this, the expired duration configuration information of buffer memory will refresh once every 1 minute.
Step 3: each concrete cache entry realizes with a class, and when adding to cache entry in the buffer memory, as Key, the expired duration of buffer memory can read from the buffer memory configuration processor according to this key with this type of full name.
Step 4: when needs are revised the expired duration of certain buffer memory, only need in database or configuration file, revise the setting of this cache class full name time corresponding.
CN2009100840855A 2009-05-14 2009-05-14 Method for realizing configurable cache Pending CN101887396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100840855A CN101887396A (en) 2009-05-14 2009-05-14 Method for realizing configurable cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100840855A CN101887396A (en) 2009-05-14 2009-05-14 Method for realizing configurable cache

Publications (1)

Publication Number Publication Date
CN101887396A true CN101887396A (en) 2010-11-17

Family

ID=43073324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100840855A Pending CN101887396A (en) 2009-05-14 2009-05-14 Method for realizing configurable cache

Country Status (1)

Country Link
CN (1) CN101887396A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866909A (en) * 2012-08-27 2013-01-09 北京奇虎科技有限公司 Resource lock system and method for controlling interface resource access
CN103257859A (en) * 2013-03-22 2013-08-21 南京信通科技有限责任公司 Application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups
CN105593824A (en) * 2013-09-30 2016-05-18 惠普发展公司,有限责任合伙企业 Controlling proxy tool with injected widget code
CN107436769A (en) * 2017-08-07 2017-12-05 安徽优易思信息技术有限责任公司 The amending method and device of a kind of cached configuration
CN108243220A (en) * 2016-12-26 2018-07-03 航天信息股份有限公司 A kind of invoice issuing method and system of the support polymorphic type invoice terminal based on tax control server
CN108984431A (en) * 2017-06-01 2018-12-11 北京京东尚科信息技术有限公司 Method and apparatus for emptying expired caching
CN110321298A (en) * 2019-06-21 2019-10-11 北京奇艺世纪科技有限公司 A kind of time interval determines method, apparatus, electronic equipment and medium
CN111258929A (en) * 2018-12-03 2020-06-09 北京京东尚科信息技术有限公司 Cache control method, device and computer readable storage medium
CN111813715A (en) * 2020-06-29 2020-10-23 湖南快乐阳光互动娱乐传媒有限公司 Data caching method and device based on accessed times

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866909A (en) * 2012-08-27 2013-01-09 北京奇虎科技有限公司 Resource lock system and method for controlling interface resource access
CN102866909B (en) * 2012-08-27 2018-02-27 北京奇虎科技有限公司 A kind of system and method for the resource lock for controlling docking port resource to access
CN103257859A (en) * 2013-03-22 2013-08-21 南京信通科技有限责任公司 Application of high-performance cache and NUTZ AOP (aspect-oriented programming) technique in education website groups
CN105593824A (en) * 2013-09-30 2016-05-18 惠普发展公司,有限责任合伙企业 Controlling proxy tool with injected widget code
US10346002B2 (en) 2013-09-30 2019-07-09 Entit Software Llc Controlling a proxy tool with injected widget code
CN108243220B (en) * 2016-12-26 2021-04-16 航天信息股份有限公司 Tax control server-based invoice issuing method and system supporting multi-type invoice terminal
CN108243220A (en) * 2016-12-26 2018-07-03 航天信息股份有限公司 A kind of invoice issuing method and system of the support polymorphic type invoice terminal based on tax control server
CN108984431A (en) * 2017-06-01 2018-12-11 北京京东尚科信息技术有限公司 Method and apparatus for emptying expired caching
CN107436769A (en) * 2017-08-07 2017-12-05 安徽优易思信息技术有限责任公司 The amending method and device of a kind of cached configuration
CN111258929A (en) * 2018-12-03 2020-06-09 北京京东尚科信息技术有限公司 Cache control method, device and computer readable storage medium
CN111258929B (en) * 2018-12-03 2023-09-26 北京京东尚科信息技术有限公司 Cache control method, device and computer readable storage medium
CN110321298A (en) * 2019-06-21 2019-10-11 北京奇艺世纪科技有限公司 A kind of time interval determines method, apparatus, electronic equipment and medium
CN111813715A (en) * 2020-06-29 2020-10-23 湖南快乐阳光互动娱乐传媒有限公司 Data caching method and device based on accessed times

Similar Documents

Publication Publication Date Title
CN101887396A (en) Method for realizing configurable cache
US7925807B2 (en) Dynamic microcode for non-volatile memory
US9367462B2 (en) Shared memories for energy efficient multi-core processors
US8997101B2 (en) Scalable thread locking with customizable spinning
CN104866434A (en) Multi-application-oriented data storage system and data storage and calling method
CN102402622B (en) The managing memory pages dispatching method of Embedded Main Memory Database
US8812489B2 (en) Swapping expected and candidate affinities in a query plan cache
US20130159281A1 (en) Efficient querying using on-demand indexing of monitoring tables
JP6276470B2 (en) System and method for reducing standby power of volatile memory in portable computing devices
CN101042703A (en) Method for managing metadata of file system using dbms
US8037088B2 (en) Change management
US20080270368A1 (en) Apparatus, system, and method for efficiently supporting generic sql data manipulation statements
US7769954B2 (en) Data processing system and method for processing data
Faust et al. Fast Lookups for In-Memory Column Stores: Group-Key Indices, Lookup and Maintenance.
Zou et al. From a stream of relational queries to distributed stream processing
US8700676B2 (en) System and method for appending metadata to objects
CN103823634A (en) Data processing method and system supporting non-random write mode
CA2858652C (en) Energy-efficient query optimization
CN105808451A (en) Data caching method and related apparatus
CN101986311B (en) Method for buffering node elements when rapidly processing large-scale XML file
CN104112024A (en) Method and device for high-performance query of database
CN116107772A (en) Multithreading data processing method and device, processor and electronic equipment
US9857864B1 (en) Systems and methods for reducing power consumption in a memory architecture
Viswanathan A guide to using LZO compression in Hadoop
CN201289643Y (en) Embedded database system based on FPGA

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
ASS Succession or assignment of patent right

Owner name: CHINA GAMES COMPETITIVE CULTURE CO., LTD.

Free format text: FORMER OWNER: GRIZZLY (BEIJING) TECHNOLOGY CO., LTD.

Effective date: 20111111

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 102218 CHANGPING, BEIJING TO: 570215 HAIKOU, HAINAN PROVINCE

TA01 Transfer of patent application right

Effective date of registration: 20111111

Address after: 570215 room 17A, crystal building, Pearl River Plaza, No. 2, Kun Kun Road, Hainan, Haikou

Applicant after: Middle reaches competitive culture Limited by Share Ltd

Address before: 102218, 701, building 39, 2 District, Tiantongyuan north, Beijing, Changping District, 7

Applicant before: Huixiong (Beijing) Technology Co., Ltd.

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20101117