CN112882829A - Cache optimization method and system based on nodejs server - Google Patents

Cache optimization method and system based on nodejs server Download PDF

Info

Publication number
CN112882829A
CN112882829A CN202110129696.8A CN202110129696A CN112882829A CN 112882829 A CN112882829 A CN 112882829A CN 202110129696 A CN202110129696 A CN 202110129696A CN 112882829 A CN112882829 A CN 112882829A
Authority
CN
China
Prior art keywords
cache
request
value
data
user
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
CN202110129696.8A
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.)
Chengdu Huanyu Zhizhi Technology Co ltd
Original Assignee
Chengdu Huanyu Zhizhi 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 Chengdu Huanyu Zhizhi Technology Co ltd filed Critical Chengdu Huanyu Zhizhi Technology Co ltd
Priority to CN202110129696.8A priority Critical patent/CN112882829A/en
Publication of CN112882829A publication Critical patent/CN112882829A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a cache optimization method based on nodejs server side, comprising the following steps: s1, receiving a first user request, and acquiring page data according to the user request; s2, transmitting the page data to a user, and caching the page data according to a caching mechanism; s3, receiving the user request again, inquiring whether the user request has cache, if yes, going to step S4, if no, going to step S1; and S4, responding to the user request. The invention also provides a cache optimization system based on the nodejs server, which comprises a request unit, a cache unit, a query unit and a response unit.

Description

Cache optimization method and system based on nodejs server
Technical Field
The invention belongs to the technical field of web server rendering caching mechanisms, and particularly relates to a cache optimization method and system based on a nodejs server.
Background
For the current website which is a more-compatible seo search engine, the weight and the ranking of the website are improved, and partial websites are rendered by using a server. The server rendering has the advantages that the webpage text resource acquired by the client does not need to be acquired by a page request any more, and the server rendering is finished. And directly filling important text information such as keywords of the webpage and the like. When the search engine crawls, all text information of the webpage can be acquired. The nodejs frame + koa frame is one of the backend technologies for realizing the rendering of the server side, but the advantages and the disadvantages of nodejs are obvious and are not suitable for cpu intensive application, because a large amount of calculation can cause the program to be stuck and broken down; and (3) rendering by the server, namely requesting page data, calculating and filling data by the server as the name implies. When a large number of users request, the server calculates page data once according to the request of each user, the server frequently calculates and consumes a large amount of cpus, when the calculated amount exceeds the load of the cpus, the server is down, and the down server cannot be restarted due to the frequent requests of the large number of users; when the server side renders, the whole amount of rendered data is returned to the client side every time, sometimes the rendered data is the same as the data of the previous time, and the client side also takes the same data, so that unnecessary flow consumption is caused.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a cache optimization method and system based on a nodejs server, which have the advantages of reducing rendering calculation of the server and reducing the flow consumption of a server.
In order to achieve the purpose, the invention adopts the technical scheme that: a cache optimization method based on a nodejs server side comprises the following steps:
s1, receiving a first user request, and acquiring page data according to the user request;
s2, transmitting the page data to a user, and caching the page data according to a caching mechanism;
s3, receiving the user request again, inquiring whether the user request has cache, if yes, going to step S4, if no, going to step S1;
and S4, responding to the user request.
In the technical scheme, the user accesses for the first time to calculate, all subsequent user accesses do not need to calculate, and cached data is used.
In a further aspect, step S1 includes:
a1, determining a page;
a2, requesting data required by the page;
a3, assembling data;
and A4, responding the data to the user.
In the technical scheme, when the server is started, a first user requests page data, such as a home page, the nodejs server determines the page, the server requests data required by the home page from a back-end server, the server assembles the data, and the server responds the data to the user.
In a further technical solution, the caching mechanism in step S2 includes:
taking the request link as a key and the response data as a value, and setting the cache time;
generating a unique md5 value using md5 calculations on the page data;
the etag value of the page is set according to the unique md5 value.
In the technical scheme, the request link is used as a key, the response data is used as a value, the key value combination is an object, the set caching time can be dynamically set, the dynamic configuration can also be carried out according to requirements, an etag value is arranged on a response header on a page, the value can be stored at a server side, the value can be calculated according to the content of the page, the content is taken out to calculate the md5 value only when floating calculation is needed for the first time, the etag value of the page is set according to the unique md5 value, and the compared values are found to be consistent when a user accesses the same page next time, the user does not respond to the page, and the user obtains a value again, but the user caches the value locally.
In a further aspect, step S3 includes: and connecting the link key according to the request to determine whether the user requests caching.
In the technical scheme, each link is unique, the unique link can be found and then directly used, the data required by the web service for requesting the page like the data service is forwarded once, the traffic consumption of the server can be reduced, if the web does not have the cache, the data is forwarded and cached to the local, and the web responds to the browser, so that the traffic consumption is reduced.
In a further technical solution, step S3 further includes: when a user request is received, If the corresponding request is linked with a cache and an If-none-match field exists in a request header, comparing the value of the If-none-match field in the request header with the cached etag value;
if the comparison result is consistent, sending 304 state code information to the client;
and if the comparison result is not consistent, sending the cache to the client, and setting a response status code 200 to the client.
In the technical scheme, when the cache exists in the web, a cache time exists, if the cache does not expire, the web reflects the cache to a user, whether the cache expires or not is judged, the time expiration is triggered once, after the time expires, the web server pulls data again and pulls an md5 value again, the md5 values are different, the two md5 values are different, which shows that the cache time expires, the client and the server are out of alignment, the client expires, a new data response is sent, the local etag is updated, the server does not have the etag value at the beginning, the client is a new user and does not have the etag value, once the first user requests, the server is triggered to calculate the etag value, the server supplies the etag value to all users, only the new user does not have the etag value, the server needs each user to actively trigger to generate the etag value, the cache expiration needs to be triggered by the user to detect whether the local time expires or not, if the latest data is pulled to the database by the web after the expiration, the data of the local web service is updated, and the md5 value is generated according to the data, wherein the md5 value is equivalent to the identification of the data.
The invention also provides a cache optimization system based on the nodejs server, which comprises a request unit, a cache unit, a query unit and a response unit, wherein:
the request unit is used for receiving a first user request and acquiring page data according to the user request;
the cache unit is used for transmitting the page data to a user and caching the page data according to a cache mechanism;
the query unit is used for receiving the user request again, querying whether the user request has cache or not, if so, entering the response unit, and if not, entering the request unit;
and the response unit is used for responding to the user request.
In a further technical solution, the request unit includes:
a1, determining a page;
a2, requesting data required by the page;
a3, assembling data;
and A4, responding the data to the user.
In a further technical solution, a caching mechanism in a caching unit includes:
taking the request link as a key and the response data as a value, and setting the cache time;
generating a unique md5 value using md5 calculations on the page data;
the etag value of the page is set according to the unique md5 value.
In a further technical solution, the query unit includes:
and connecting the link key according to the request to determine whether the user requests caching.
In a further aspect, the response unit includes:
when a user request is received, If the corresponding request is linked with a cache and an If-none-match field exists in a request header, comparing the value of the If-none-match field in the request header with the cached etag value;
if the comparison result is consistent, sending 304 state code information to the client;
and if the comparison result is not consistent, sending the cache to the client, and setting a response status code 200 to the client.
The invention has the beneficial effects that:
(1) the calculation times of the nodejs server side are reduced, and the CPU consumption of the server is reduced;
(2) the flow of the server is reduced, the cost is reduced, and the request of the client can be responded quickly.
Drawings
FIG. 1 is a flowchart of a cache optimization method based on nodejs server according to the present invention;
fig. 2 is a schematic structural diagram of a cache optimization system based on nodejs servers according to the present invention.
Description of reference numerals:
10. a request unit; 11. a buffer unit; 12. a query unit; 13. a response unit.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Example (b):
as shown in fig. 1, the present invention provides a cache optimization method based on nodejs server, including the following steps:
s1, receiving a first user request, and acquiring page data according to the user request;
s2, transmitting the page data to a user, and caching the page data according to a caching mechanism;
s3, receiving the user request again, inquiring whether the user request has cache, if yes, going to step S4, if no, going to step S1;
and S4, responding to the user request.
In this embodiment, the user accesses for the first time to perform calculation, and all subsequent user accesses do not need calculation, and use cached data; when the server responds the home page data to the user for the first time, the data responded out is cached in the server in time, and the caching mechanism is as follows: with the request link as key, the response data as value, and setting the cache time, a unique md5 value is generated using md5 calculation for the current data, which is later used as the etag value for the set page. When the next user requests, whether the cache exists is inquired from the server according to the request link. If no buffer memory exists or the buffer memory is expired, the first step is executed again. And (4) with the cache, responding to the client request by directly using the cache. Reducing the flow of the server, when the cost reduction server receives the request of the client, If the corresponding request links the server and the request header has an If-none-match field, comparing the value of the If-none-match field in the request header with the etag value cached by the server, If the consistent server responds 304 state code information to the client, 304 means: the browser is told that the local cache data is consistent with the server side, and the server does not need to send the information to the client side again, so that a large amount of flow cost is saved. If the two value comparisons are not consistent, the server sends the cache to the client and sets a response status code 200 to the client.
In another embodiment, step S1 includes:
a1, determining a page;
a2, requesting data required by the page;
a3, assembling data;
and A4, responding the data to the user.
In this embodiment, step a2 will consume data traffic, and step A3 will occupy the cup of the server; when a large amount of requests are accessed, a subsequent caching mechanism is not available, which causes a large amount of traffic consumption of the node server and a surge of the cpu, and finally causes a server to be down. A2 and A3 also consume a certain time, and a user can have short white screen waiting time when opening a browser webpage and cannot achieve the result of quickly responding to a user request page. When the server is powered on, a first user requests page data, such as a home page, the nodejs server determines the page, the server requests the back-end server for the data needed for the home page, the server assembles the data, and the server responds with the data to the user.
In another embodiment, the caching mechanism in step S2 includes:
taking the request link as a key and the response data as a value, and setting the cache time;
generating a unique md5 value using md5 calculations on the page data;
the etag value of the page is set according to the unique md5 value.
In this embodiment, according to the links requested by the user using the browser (each link of the web page is unique), the node server will cache each link as a unit. In the unit area of each link, the web page data (assembled web page original code), the web page cache time and the cache creation time (namely the timestamp when the cache is generated) of the link are stored, the current web page etag value is calculated according to the web page data, the etag value is obtained by carrying out md5 calculation algorithm on the assembled web page original code, and the etag value is a unique value as the current link. After the cache is finished, the client request is responded, the cache data of the current link is transmitted to the client browser, and an etag value is set on a response head. Step 2 is also executed when the cache is expired, the last data is overwritten by the new data acquired in step 1, and a new md5 value is generated; the request link is used as a key, the response data is used as a value, the key value combination is an object, the set cache time can be dynamically set, the dynamic configuration can also be carried out according to requirements, an etag value is arranged on a response head on a page, the value can be stored in a server, the value can be calculated according to the content of the page, the content is taken out to calculate the md5 value only when floating calculation is needed for the first time, the etag value of the page is set according to the unique md5 value, and when a user accesses the same page next time, the compared values are found to be consistent, the comparison values are not responded to the user, the user obtains the value again, and the user caches the value locally.
In another embodiment, step S3 includes: and connecting the link key according to the request to determine whether the user requests caching.
In this embodiment, whether a node server has a data cache unit for caching a current link is queried according to a browser request link, and whether the cache is expired is judged. The expiration judging method is that whether the current time minus the cache creating time is larger than the set cache time or not is used, if so, the expiration is judged, otherwise, the expiration is not judged. Because each link is unique, the unique link can be found and then directly used, the web service like a data service requests data required by a page, namely forwarding once, the embodiment can reduce the traffic consumption of the server, if the web does not have a cache, the web needs to be forwarded and cached to the local, and the web responds to the browser again, namely reducing the traffic consumption.
In another embodiment, step S3 further includes: when a user request is received, If the corresponding request is linked with a cache and an If-none-match field exists in a request header, comparing the value of the If-none-match field in the request header with the cached etag value;
if the comparison result is consistent, sending 304 state code information to the client;
and if the comparison result is not consistent, sending the cache to the client, and setting a response status code 200 to the client.
In this embodiment, when a user request is received, if a corresponding request link has a cache, the node service checks whether the cache is expired. If the cache is not expired and If-none-match fields exist in the request header (the If-none-match is actually an etag value set for the browser by the node server at the beginning and is just another expression form), comparing the value of the If-none-match fields in the request header with the etag value in the current link cache unit area; if the comparison result is consistent, sending 304 state code information to the client, wherein the meaning of 304 is that the browser continues to use the local data of the current browser, and because the local data is consistent with the data of the node server, extra traffic consumption caused by data transmission is not needed; if the comparison result is not consistent, or If the request header does not have an If-none-match field, the cache is sent to the client, a response status code 200 is set to the client, and then the etag value of the request header is set to be consistent with the node server. When the cache is overdue, the node server starts to request the latest data of the current link, and the step S1 is executed, and then the step 2 is executed; when the cache is stored in the web, if the cache is not expired, the web can reflect the user, whether the cache is expired or not is judged, the time expiration is triggered once, after the time expiration, the web server can pull the data again and pull the md5 value again, at the moment, the md5 values are different, the two md5 values are different, the cache time is expired, when the client and the server are not matched, the client is expired, a new data response is sent, the local etag is updated, the server does not have the etag value at the beginning, the client is a new user, the etag value is not existed, once the client and the server are not matched, the server is triggered to calculate the etag value after the first user request, the server supplies the etag value to all users, only the new user does not have the etag value, the server needs each user to actively trigger to generate the etag value, the cache expiration needs the user to access to trigger to detect whether the local time is expired, if the cache is expired, the latest data is pulled to the database by the web, and updating data of the local web service, and generating an md5 value according to the data, wherein the md5 value is equivalent to the identification of the data.
The present invention also provides a cache optimization system based on nodejs server, as shown in fig. 2, including a request unit, a cache unit, a query unit and a response unit, where:
the request unit is used for receiving a first user request and acquiring page data according to the user request;
the cache unit is used for transmitting the page data to a user and caching the page data according to a cache mechanism;
the query unit is used for receiving the user request again, querying whether the user request has cache or not, if so, entering the response unit, and if not, entering the request unit;
and the response unit is used for responding to the user request.
In this embodiment, when the server responds to the user with the home page data for the first time, the request unit receives the request, the response unit caches the responded data in the server in time, the cache unit takes the request link as a key and the response data as a value, sets the cache time, calculates and generates a unique md5 value for the current data by using md5, and then uses the unique md5 value as an etag value of the set page.
In another embodiment, the request unit includes:
a1, determining a page;
a2, requesting data required by the page;
a3, assembling data;
and A4, responding the data to the user.
In this embodiment, when the server is powered on, the first user requests page data, such as the home page, the nodejs server determines the page, the server requests the data needed for the home page from the back-end server, the server assembles the data, and the server responds the data to the user.
In another embodiment, the caching mechanism in the cache unit comprises:
taking the request link as a key and the response data as a value, and setting the cache time;
generating a unique md5 value using md5 calculations on the page data;
the etag value of the page is set according to the unique md5 value.
In this embodiment, according to the links requested by the user using the browser (each link of the web page is unique), the node server will cache each link as a unit. In the unit area of each link, the web page data (assembled web page original code), the web page cache time and the cache creation time (namely the timestamp when the cache is generated) of the link are stored, the current web page etag value is calculated according to the web page data, the etag value is obtained by carrying out md5 calculation algorithm on the assembled web page original code, and the etag value is a unique value as the current link. After the cache is finished, the client request is responded, the cache data of the current link is transmitted to the client browser, and an etag value is set on a response head. When the cache is expired, the cache unit is also executed, the last data is overwritten by the new data acquired by the request unit, and a new md5 value is generated; the request link is used as a key, the response data is used as a value, the key value combination is an object, the set cache time can be dynamically set, the dynamic configuration can also be carried out according to requirements, an etag value is arranged on a response head on a page, the value can be stored in a server, the value can be calculated according to the content of the page, the content is taken out to calculate the md5 value only when floating calculation is needed for the first time, the etag value of the page is set according to the unique md5 value, and when a user accesses the same page next time, the compared values are found to be consistent, the comparison values are not responded to the user, the user obtains the value again, and the user caches the value locally.
In another embodiment, the query unit comprises:
and connecting the link key according to the request to determine whether the user requests caching.
In this embodiment, whether a node server has a data cache unit for caching a current link is queried according to a browser request link, and whether the cache is expired is judged. The expiration judging method is that whether the current time minus the cache creating time is larger than the set cache time or not is used, if so, the expiration is judged, otherwise, the expiration is not judged.
When a user request is received, the corresponding request is inquired to be linked with the cache, and the node service self-checking whether the cache is overdue or not is carried out. If the cache is not expired and If-none-match fields exist in the request header (the If-none-match is actually an etag value set for the browser by the node server at the beginning and is just another expression form), comparing the value of the If-none-match fields in the request header with the etag value in the current link cache unit area; if the comparison result is consistent, sending 304 state code information to the client, wherein the meaning of 304 is that the browser continues to use the local data of the current browser, and because the local data is consistent with the data of the node server, extra traffic consumption caused by data transmission is not needed; if the comparison result is not consistent, or If the request header does not have an If-none-match field, the cache is sent to the client, a response status code 200 is set to the client, and then the etag value of the request header is set to be consistent with the node server. And when the cache is overdue, the node server starts to request the latest data of the current link, enters a request unit, and then executes the cache unit.
Because each link is unique, the unique link can be found and then directly used, the web service like a data service requests data required by a page, namely forwarding once, the embodiment can reduce the traffic consumption of the server, if the web does not have a cache, the web needs to be forwarded and cached to the local, and the web responds to the browser again, namely reducing the traffic consumption.
In another embodiment, the response unit includes:
when a user request is received, If the corresponding request is linked with a cache and an If-none-match field exists in a request header, comparing the value of the If-none-match field in the request header with the cached etag value;
if the comparison result is consistent, sending 304 state code information to the client;
and if the comparison result is not consistent, sending the cache to the client, and setting a response status code 200 to the client.
In this embodiment, when the cache exists in the web, if the cache does not expire, the web will reflect to the user, determine whether the cache expires, the expiration of the time will trigger once, after the expiration of the time, the web server will pull the data again, pull the md5 value again, when the md5 values are different, the two md5 values are different, which indicates that our cache time expires, the client and the server are out of alignment, the client will send a new data response and update the local etag, the server will not have the etag value at the beginning, when the client is a new user, the client will not have the etag value, once the first user requests, the server will be triggered to calculate the etag value, the server will supply the etag value to all users, only the new user does not have the etag value, the server needs to actively trigger to generate the etag value by each user, when the cache expires, the user access to trigger to detect whether the local time expires, if the latest data is pulled to the database by the web after the expiration, the data of the local web service is updated, and the md5 value is generated according to the data, wherein the md5 value is equivalent to the identification of the data.
The above-mentioned embodiments only express the specific embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (10)

1. A cache optimization method based on a nodejs server is characterized by comprising the following steps:
s1, receiving a first user request, and acquiring page data according to the user request;
s2, transmitting the page data to a user, and caching the page data according to a caching mechanism;
s3, receiving the user request again, inquiring whether the user request has cache, if yes, going to step S4, if no, going to step S1;
and S4, responding to the user request.
2. The method for cache optimization based on nodejs server end of claim 1, wherein the step S1 includes:
a1, determining a page;
a2, requesting data required by the page;
a3, assembling data;
and A4, responding the data to the user.
3. The method for cache optimization based on nodejs server end of claim 1, wherein the caching mechanism in step S2 includes:
taking the request link as a key and the response data as a value, and setting the cache time;
generating a unique md5 value using md5 calculations on the page data;
the etag value of the page is set according to the unique md5 value.
4. The method for cache optimization based on nodejs server end of claim 1, wherein the step S3 includes:
and connecting the link key according to the request to determine whether the user requests caching.
5. The method for cache optimization based on nodejs server end of claim 1, wherein the step S3 further includes:
when a user request is received, If the corresponding request is linked with a cache and an If-none-match field exists in a request header, comparing the value of the If-none-match field in the request header with the cached etag value;
if the comparison result is consistent, sending 304 state code information to the client;
and if the comparison result is not consistent, sending the cache to the client, and setting a response status code 200 to the client.
6. A cache optimization system based on a nodejs server is characterized in that the system comprises a request unit, a cache unit, a query unit and a response unit, wherein:
the request unit is used for receiving a first user request and acquiring page data according to the user request;
the cache unit is used for transmitting the page data to a user and caching the page data according to a cache mechanism;
the query unit is used for receiving the user request again, querying whether the user request has cache or not, if so, entering the response unit, and if not, entering the request unit;
and the response unit is used for responding to the user request.
7. The nodejs server-based cache optimization system according to claim 6, wherein the request unit comprises:
a1, determining a page;
a2, requesting data required by the page;
a3, assembling data;
and A4, responding the data to the user.
8. The system of claim 6, wherein the caching mechanism in the caching unit comprises:
taking the request link as a key and the response data as a value, and setting the cache time;
generating a unique md5 value using md5 calculations on the page data;
the etag value of the page is set according to the unique md5 value.
9. The nodejs server-based cache optimization system of claim 6, wherein the query unit comprises:
and connecting the link key according to the request to determine whether the user requests caching.
10. The nodejs server-based cache optimization system according to claim 6, wherein the response unit comprises:
when a user request is received, If the corresponding request is linked with a cache and an If-none-match field exists in a request header, comparing the value of the If-none-match field in the request header with the cached etag value;
if the comparison result is consistent, sending 304 state code information to the client;
and if the comparison result is inconsistent, sending the cache to the client, and setting a response state code to respond the page data to the client.
CN202110129696.8A 2021-01-29 2021-01-29 Cache optimization method and system based on nodejs server Pending CN112882829A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110129696.8A CN112882829A (en) 2021-01-29 2021-01-29 Cache optimization method and system based on nodejs server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110129696.8A CN112882829A (en) 2021-01-29 2021-01-29 Cache optimization method and system based on nodejs server

Publications (1)

Publication Number Publication Date
CN112882829A true CN112882829A (en) 2021-06-01

Family

ID=76051985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110129696.8A Pending CN112882829A (en) 2021-01-29 2021-01-29 Cache optimization method and system based on nodejs server

Country Status (1)

Country Link
CN (1) CN112882829A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785637A (en) * 2022-03-15 2022-07-22 浪潮云信息技术股份公司 Implementation method and system for caching response data by API gateway

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012931A (en) * 2010-12-01 2011-04-13 北京瑞信在线系统技术有限公司 Filter cache method and device, and cache system
CN103064932A (en) * 2012-12-24 2013-04-24 乐视网信息技术(北京)股份有限公司 System and method for processing static page
CN104657401A (en) * 2014-10-21 2015-05-27 北京齐尔布莱特科技有限公司 Web cache updating method
CN105871980A (en) * 2015-12-01 2016-08-17 乐视体育文化产业发展(北京)有限公司 Method and device for increasing cache hit ratio
CN108920703A (en) * 2018-07-18 2018-11-30 郑州云海信息技术有限公司 A kind of HTTP cache optimization method and device
US10346303B1 (en) * 2017-06-26 2019-07-09 Amazon Technologies, Inc. Origin server cache eviction system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012931A (en) * 2010-12-01 2011-04-13 北京瑞信在线系统技术有限公司 Filter cache method and device, and cache system
CN103064932A (en) * 2012-12-24 2013-04-24 乐视网信息技术(北京)股份有限公司 System and method for processing static page
CN104657401A (en) * 2014-10-21 2015-05-27 北京齐尔布莱特科技有限公司 Web cache updating method
CN105871980A (en) * 2015-12-01 2016-08-17 乐视体育文化产业发展(北京)有限公司 Method and device for increasing cache hit ratio
US10346303B1 (en) * 2017-06-26 2019-07-09 Amazon Technologies, Inc. Origin server cache eviction system
CN108920703A (en) * 2018-07-18 2018-11-30 郑州云海信息技术有限公司 A kind of HTTP cache optimization method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
富士康质检员张全蛋: "Nginx 客户端缓存Etag和If-None-Match", pages 2, Retrieved from the Internet <URL:https://blog.csdn.net/qq_34556414/article/details/106337292> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785637A (en) * 2022-03-15 2022-07-22 浪潮云信息技术股份公司 Implementation method and system for caching response data by API gateway

Similar Documents

Publication Publication Date Title
US6678791B1 (en) System and method for session-aware caching
US7315884B2 (en) Reduction of network retrieval latency using cache and digest
US9602620B1 (en) Content-facilitated speculative preparation and rendering
US9967359B2 (en) Meta-data based method for local cache utilization
US10171550B1 (en) Static tracker
US20080235326A1 (en) Methods and Apparatus for Accelerating Web Browser Caching
JP4366040B2 (en) Network service system, server and program
US7937361B2 (en) Method of reflecting on another device a change to a browser cache on a handheld electronic device, and associated device
US9158845B1 (en) Reducing latencies in web page rendering
US10686726B2 (en) Method for optimizing resource loading at mobile browsers based on cloud-client cooperation
US7509404B2 (en) Methods and systems for partial page caching of dynamically generated content
US20120317188A1 (en) Refreshing Cached Documents and Storing Differential Document Content
US20130138763A1 (en) Systems and methods for caching and serving dynamic content
US20050192995A1 (en) System and methods for invalidation to enable caching of dynamically generated content
US20040068579A1 (en) System and method to refresh proxy cache server objects
US7908437B2 (en) Method and system for efficient fragment caching
CN112100541B (en) Method and device for loading website page element, electronic device and storage medium
US12086129B2 (en) Distributed data processing
WO2015196442A1 (en) Webpage optimization device and method
CN112882829A (en) Cache optimization method and system based on nodejs server
CN102681996B (en) Pre-head method and device
CN116975482A (en) HTTP caching mechanism realization method and tool for Web page
US6968396B1 (en) Reloading of hypermedia pages by sending only changes
CN113364830B (en) Long-link cache optimization method and system
CN117194823A (en) Data updating method, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination