Systems and methods for caching content with notification-based invalidation
First Claim
1. A computer-implemented method operable in a server that has circuitry forming one or more processors and memory holding instructions for execution by the one or more processors, the method comprising:
- receiving a client request;
in response to the client request, generating a forward request to a remote source;
receiving a response to the forward request from the remote source, the response comprising responsive content and at least one token, the at least one token corresponding to information stored at the remote source upon which the responsive content depends, wherein the information is distinct from the responsive content and was a basis for the remote source'"'"'s construction of the responsive content;
locally caching the responsive content and the at least one token;
serving the responsive content to the client, in response to the client request;
receiving a message indicating that the at least one token is invalid wherein the message comprises an implicit assertion that the at least one token is invalid; and
treating the cached responsive content as invalid to serve in response to a subsequent client request because the responsive content is associated with the at least one token that was indicated to be invalid in the message.
1 Assignment
0 Petitions
Accused Products
Abstract
Described herein are systems, devices, and methods for content delivery on the Internet. In certain non-limiting embodiments, a caching model is provided that can support caching for indefinite time periods, potentially with infinite or relatively long time-to-live values, yet provide prompt updates when the underlying origin content changes. In one approach, an origin server can annotate its responses to content requests with tokens, e.g., placing them in an appended HTTP header or otherwise. The tokens can drive the process of caching, and can be used as handles for later invalidating the responses within caching proxy servers delivering the content. Tokens may be used to represent a variety of kinds of dependencies expressed in the response, including without limitation data, data ranges, or logic that was a basis for the construction of the response.
92 Citations
26 Claims
-
1. A computer-implemented method operable in a server that has circuitry forming one or more processors and memory holding instructions for execution by the one or more processors, the method comprising:
-
receiving a client request; in response to the client request, generating a forward request to a remote source; receiving a response to the forward request from the remote source, the response comprising responsive content and at least one token, the at least one token corresponding to information stored at the remote source upon which the responsive content depends, wherein the information is distinct from the responsive content and was a basis for the remote source'"'"'s construction of the responsive content; locally caching the responsive content and the at least one token; serving the responsive content to the client, in response to the client request; receiving a message indicating that the at least one token is invalid wherein the message comprises an implicit assertion that the at least one token is invalid; and treating the cached responsive content as invalid to serve in response to a subsequent client request because the responsive content is associated with the at least one token that was indicated to be invalid in the message. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. An apparatus, comprising:
-
a microprocessor and memory storing computer-program instructions for execution by the one or more microprocessors, the execution of the computer-program instructions causing the apparatus to; receive a client request; in response to the client request, generate a forward request to a remote source; receive a response to the forward request from the remote source, the response comprising responsive content and at least one token, the at least one token corresponding to information stored at the remote source upon which the responsive content depends, wherein the information is distinct from the responsive content and was a basis for the remote source'"'"'s construction of the responsive content; cache the responsive content and the at least one token in a cache local to the apparatus; serve the responsive content to the client, in response to the client request; receive a message indicating that the at least one token is invalid wherein the message comprises an implicit assertion that the at least one token is invalid; and treat the cached responsive data as invalid to serve in response to a subsequent client request because the responsive data is associated with the at least one token that was indicated to be invalid in the message.
-
-
19. A computer-implemented method operable in a server that has circuitry forming one or more processors and memory holding instructions for execution by the one or more processors, the method comprising:
-
receiving content having appended thereto one or more tokens, the one or more tokens corresponding to information stored at a remote source upon which the content depends, wherein the information is distinct from the content and was a basis for the remote source'"'"'s construction of the content; caching the content and the one or more tokens; receiving a client request for content; determining that cached content is responsive to the request; determining whether each of the cached one or more tokens are valid; upon a determination that all of the one or more cached tokens are valid, serving the cached response to the client; wherein the determination of whether a given one of the one or more cached tokens that were received with the response is valid comprises;
comparing any of a timestamp and a serial number of the given token with a respective timestamp or serial number of a corresponding token stored in a cache of current tokens,upon a determination that at least one of the one or more cached tokens are not valid, sending a forward request to the remote source for the content. - View Dependent Claims (20, 21, 22)
-
-
23. A system, comprising:
-
a plurality of distributed servers operated by a CDN service provider, the plurality of distributed servers receiving requests from clients directed to an application programmer'"'"'s interface (API); in response to the requests from clients, the plurality of distributed servers generating respective forward requests to at least one origin server associated with an API provider; the plurality of distributed servers receiving respective API responses from the at least one origin server in response to the forward requests, the respective API responses comprising responsive data and one or more tokens, the one or more tokens corresponding to information stored at the at least one origin server upon which the responsive data depends, wherein the information is distinct from the responsive data and was a basis for the at least one origin server'"'"'s construction of the responsive data; the plurality of distributed servers storing the respective API responses in respective local caches; the at least one origin server generating an invalidation directed to at least one token of the one or more tokens and sending the invalidation to at least one machine operated by the CDN service provider, the invalidation being included as part of a particular API response to a particular client request; the at least one machine sending the invalidation to the plurality of distributed servers; wherein each of the plurality of distributed servers, as a result of receiving the invalidation, treats locally stored API responses that are associated with the at least one token as invalid to serve in response to subsequent client requests. - View Dependent Claims (24, 25, 26)
-
Specification