Method and device for setting file cache time

A caching time and file caching technology, applied in the Internet field, can solve the problems of increasing the number of HTTP file back-to-source, wasting bandwidth resources, and different access frequencies.

Active Publication Date: 2014-11-05
GUANGDONG EFLYCLOUD COMPUTING CO LTD
View PDF11 Cites 28 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, the cache time is set manually, but in some large web servers, there are a large number of HTTP files, and the HTTP files are often divided into several directories to set the cache time. The files in the same directory are set to the same cache time. However, the access frequency of each HTTP...

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
  • Method and device for setting file cache time
  • Method and device for setting file cache time

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] figure 1 It is a schematic flowchart of a method for setting the file cache time provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of caching files from the server to the local, and the method can be executed by the device for setting the file cache time, specifically including Follow the steps below:

[0030] Step S101, setting a reference cache time of a file.

[0031] In step S101, the reference cache time can be set according to the modification time and modification frequency of the file. Specifically, if the modification frequency exceeds the preset frequency, a shorter reference cache time can be set; if the modification frequency is lower than the preset frequency, you can set a longer baseline cache time.

[0032] Step S102, obtaining the access information of the file, calculating the access frequency according to the access information, and adjusting the reference cache time according to the calculated access frequ...

Embodiment 2

[0038] figure 2 It is a schematic structural diagram of an apparatus for setting a file cache time provided in Embodiment 2 of the present invention.

[0039] Embodiment 2 of the present invention provides a device for setting file cache time, such as figure 2 As shown, it includes: a reference buffer time setting module 21 , a reference buffer time adjustment module 22 and a reference buffer time reset module 23 .

[0040] Wherein, the benchmark buffer time setting module 21 is used to set the benchmark buffer time of the file; the benchmark buffer time adjustment module 22 is used to obtain the access information of the file, calculate the access frequency according to the access information, and adjust the access frequency according to the calculated access frequency. The reference cache time; the reference cache time reset module 23, configured to reset the reference cache time of the file according to the adjusted reference cache time.

[0041] In the reference buffer...

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 embodiment of the invention discloses a method and a device for setting the file cache time. The method comprises the following steps that: the reference cache time of a file is set; access information of the file is obtained, the access frequency is calculated according to the access information, and the reference cache time is adjusted according to the access frequency obtained after the calculation; and the reference cache time of the file is reset according to the adjusted reference cache time. Through the method and the device for setting the file cache time disclosed by the embodiment of the invention, the dynamic adjustment on the file cache time is realized; cache resources are reasonably allocated; the excessive cache resource occupation caused by too long or too short file cache time is prevented; the number of times of file resource return is reduced; and the bandwidth and server end resources are saved.

Description

technical field [0001] The embodiment of the present invention relates to the technical field of the Internet, in particular to a method and device for setting a file cache time. Background technique [0002] HTTP (Hypertext transfer protocol, hypertext transfer protocol) caching technology can cache the HTTP files sent by the World Wide Web Web server locally. When the user requests to access the HTTP files again, it does not need to request the HTTP files from the Web server, and directly reads the local HTTP files. Files are enough, which can save a lot of bandwidth resources and reduce the response load of the web server. [0003] At present, the cache time is set manually, but in some large web servers, there are a large number of HTTP files, and the HTTP files are often divided into several directories to set the cache time. The files in the same directory are set to the same cache time. However, the access frequency of each HTTP file is different. In this case, if th...

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
IPC IPC(8): G06F17/30G06F12/08H04L29/06G06F12/0813
CPCG06F16/172H04L67/568
Inventor 刘杰梁润强霍键聪
Owner GUANGDONG EFLYCLOUD COMPUTING CO LTD
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