Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A method and device for setting file cache time

A technology of caching time and file caching, which is applied in the Internet field and can solve problems such as increasing the response load of web servers, different access frequencies, and wasting bandwidth resources

Active Publication Date: 2018-04-20
GUANGDONG EFLYCLOUD COMPUTING CO LTD
View PDF11 Cites 0 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 file is different. In this case, if the same cache time is used, the HTTP file will be randomly discarded on the cache device with a tight cache capacity, which will increase the number of times the HTTP file is returned to the source, which will waste bandwidth resources. Increase the response load of the web server

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
  • A method and device for setting file cache time
  • A 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 present invention discloses a method and device for setting a file cache time, the method comprising: setting a reference cache time of a file; acquiring file access information, calculating the access frequency according to the access information, and according to the calculated access frequency , adjust the base cache time; reset the base cache time of the file according to the adjusted base cache time. The embodiment of the present invention discloses a method and device for setting the file cache time, which can dynamically adjust the file buffer time, allocate cache resources reasonably, and prevent excessive cache resources from being occupied due to the file cache time being set too long or too short , reducing the number of times files are returned to the source, saving bandwidth and server-side resources.

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F17/30G06F12/0877H04L29/06G06F12/0813
CPCG06F16/172H04L67/568
Inventor 刘杰梁润强霍键聪
Owner GUANGDONG EFLYCLOUD COMPUTING CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products