A method and device for adjusting file cache time

A technology of file caching and caching time, applied in the Internet field, can solve problems such as inaccurate cache time, insufficient utilization of cache capacity, and increased response load of web servers

Active Publication Date: 2018-04-27
GUANGDONG EFLYCLOUD COMPUTING CO LTD
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 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 can only be divided into several directories to set the cache time
Simply rely on the directory or some other static indicators to set the cache time, the set cache time is not accurate, the cache capacity cannot be fully utilized, and the number of times HTTP files are returned to the source will be increased, bandwidth resources will be wasted, and the web server will be increased. response load

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 adjusting file cache time
  • A method and device for adjusting file cache time
  • A method and device for adjusting file cache time

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0031] figure 1 It is a flow chart of a method for adjusting the file cache time provided by Embodiment 1 of the present invention. This embodiment is applicable to the case where files are cached from the server to the local, and the method can be executed by a device for adjusting the file cache time. Specifically include the following steps:

[0032] Step S101, scan the current file regularly, record the information of the current file obtained by the current scan after scanning the current file each time, and determine whether the current file has been modified compared with the previous scanning time according to the recorded information, if it is determined that it has been modified, then Record modification time.

[0033] In step S101, the recorded information of the current file may include: at least one of summary information, last modification information, entity value ETag of the requested variable, and file content. Preferably, the digest information can be obtai...

Embodiment 2

[0040] figure 2 It is a schematic flowchart of a method for adjusting file cache time provided by Embodiment 2 of the present invention. Embodiment 2 of the present invention provides a method for adjusting file cache time, such as figure 2 shown, including the following steps:

[0041] Step S201, regularly scan the current file, and record the information of the current file obtained in the current scan after scanning the current file each time;

[0042] In step S201, the information of the current file obtained by scanning may include: at least one of summary information, last modification information, entity value ETag of the requested variable, and file content.

[0043] Step S202, obtaining the information of the current file obtained from the previous scan, and comparing the information of the current file obtained from the previous scan with the information of the current file obtained from the current scan; If the information of the current file is inconsistent, i...

Embodiment 3

[0051] image 3 It is a schematic structural diagram of an apparatus for adjusting file cache time provided by Embodiment 3 of the present invention.

[0052] Embodiment 3 of the present invention provides a device for adjusting file cache time, such as image 3 As shown, it includes: a current file scanning module 31 , a buffer time calculation module 32 and a buffer time setting module 33 .

[0053] Wherein, the current file scanning module 31 is used to regularly scan the current file, record the information of the current file obtained by the current scan after scanning the current file each time, and determine whether the current file has been scanned compared to the previous scanning time according to the recorded information. Modify, if it is determined that it is modified, then record the modification time; the buffer time calculation module 32 is used to count the modification frequency of the current file in the preset time period according to the modification time ...

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 adjusting the file cache time. The method comprises the following steps that: a current file is regularly scanned; after the current file is scanned in each time, the current file information obtained through the current scanning is recorded; whether the current file is modified or not relative to the previous scanning time is determined according to the recorded information; if the current file is determined to be modified, the modifying time is recorded; according to the recorded modifying time, the modifying frequency of the current file in a preset time period is counted, and the cache time of the current time is calculated according to the modifying frequency; and the cache time of the current file is set according to a calculating result. Through the method and the device for adjusting the file cache time disclosed by the embodiment of the invention, the effects of dynamically adjusting the cache time, reducing the number of source file return times of the file and saving the bandwidth and resources at a server end are achieved.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of the Internet, in particular to a method and device for adjusting 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] Because HTTP files have different modification frequencies, some HTTP files are modified more frequently, you can set a shorter cache time, and some HTTP files are modified less frequently, you can set a longer cache time, reasonable setting cache time can save bandwidth and Server-side resources. [0004] At present, the caching time is set ...

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/30
CPCG06F16/172
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