Configurable caching system and method

A caching system and caching technology, applied in the Internet field, can solve problems such as cache invalidation and achieve the effect of guaranteeing the hit rate

Active Publication Date: 2015-12-02
MOLBASE SHANGHAI BIOTECH CO LTD
View PDF4 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In real business scenarios, changes in browsers, operating systems, url redirection, get parameters, cookie values, and many other factors may cause cache invalidation

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
  • Configurable caching system and method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0020] See figure 1 , a configurable caching system of the present invention, including a front-end scheduler, a front-end cache server, and a front-end scheduler, here refers to seven-layer application proxy software widely used in web development, including nginx, haproxy, etc. are very efficient For the front-end scheduler, nginx is preferred in the present invention.

[0021] Relevant location rules and embedded script Lua language are configured in the front-end scheduler. The present invention uses embedded script Lua language programming to eliminate possible interference with the cache through url rewriting technology and custom header domain values ​​in the front-end scheduler. factor to maximize the cache hit rate.

[0022] The configurable caching method of the present invention is implemented by the above-mentioned configurable caching system, and includes at least the following steps:

[0023] (1) The front-end scheduler forwards the request, judges the request,...

Embodiment 2

[0047] Taking the login user language version distinction as an example, the present invention is divided into proxy service configuration logic and response matching logic.

[0048] An example of proxy service configuration logic is as follows:

[0049] rewrite / demo.php?test=abc / demo.phplast;#Use internal jump to achieve the purpose of modifying url

[0050] set$deflangen; #default value

[0051] set_by_lua$flang'

[0052] locall=ngx.req.get_headers()['Accept-Language']

[0053] return

[0054] ';

[0055] if($flang~'zh'){#Browser logic--request header Accept-Language

[0056] set $deflangzh;

[0057]}

[0058] if($cookie_deflang){#cookie logic --deflang

[0059] set $deflang $cookie_deflang;

[0060]}

[0061] fastcgi_paramHTTP_VARY_DEFLANG$deflang; #Generate request header Vary-Deflang.

[0062] The response matching logic is as follows:

[0063] header('Vary:Vary-Deflang').

[0064]The above example only shows the matching and rewriting of a specific url, and ...

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 provides a configurable caching system and method. The system comprises a front-end scheduler and a front-end cache server. A related location rule and an embedded script Lua language are provided in the front-end scheduler. According to the system and the method provided by the invention, by using url rewriting technology and a self-defined header field value in the front-end scheduler, factors that may interfere with caching are eliminated, thereby ensuring a hit rate of caching to a maximum extent; it is ensured that different URLs are cached according to same logic; meanwhile, it is ensured that login users are provided with separate caching logic for a same URL.

Description

technical field [0001] The invention relates to the field of the Internet, in particular to a front-end caching system and method. Background technique [0002] Cache technology is ubiquitous in computer systems, from computers to various routing devices, from software implementation to hardware implementation, a well-designed cache system can greatly improve the response speed of the system and improve the user experience. In Internet applications, the cache system is divided into back-end caches such as memcache and redis, and front-end cache systems such as Squid, Varnish, Nginx, and Apache TrafficServer. Regardless of the front-end cache or the back-end cache, adapting to business needs and improving the cache hit rate are the most important pursuits. [0003] Front-end cache service, here refers to the use of CDN technology, using Squid, Varnish, Nginx, Apache TrafficServer, etc. as front-end cache to provide cache services described in the HTTP protocol. [0004] The...

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): G06F12/08H04L29/06
Inventor 文军
Owner MOLBASE SHANGHAI BIOTECH 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