PROBABILISTIC TECHNIQUE FOR CONSISTENCY CHECKING CACHE ENTRIES
First Claim
Patent Images
1. A computer-readable medium whose contents cause a computing system to perform a method for managing a cache, the method comprising:
- receiving a request for an object;
if the cache does not contain a cached version of the object;
obtaining a current version of the object from a source associated with the object;
storing the obtained current version of the object in the cache;
attributing a minimum lifetime and a maximum lifetime to the current version of the object based upon the time at which the current version of the object was stored in the cache;
using the current version of the object to respond the received request;
if the cache contains a cached version of the object;
if a minimum lifetime attributed to the cached version of the object has not expired, using the cached version of the object to respond the received request;
if the minimum lifetime attributed to the cached version of the object has expired, but a maximum lifetime attributed to the cached version of the object has not expired;
determining a random or pseudorandom number within a range;
if the determined number exceeds a probability threshold determined with respect to the range, using the cached version of the object to respond the received request;
if the maximum lifetime attributed to the cached version of the object has expired, or if the determined number does not exceed the probability threshold;
obtaining a current version of the object from the source associated with the object;
storing the current version of the object in the cache;
attributing a minimum lifetime and a maximum lifetime to the current version of the object based upon the time at which the current version of the object was stored in the cache; and
using the current version of the object to respond the received request.
1 Assignment
0 Petitions
Accused Products
Abstract
A facility for determining whether to consistency-check a cache entry is described. The facility randomly or pseudorandomly selects a value in a range. If the selected value satisfies a predetermined consistency-checking threshold within the range, the facility consistency-checks the entry, and may decide to propagate this knowledge to other cache managers. If, on the other hand, the selected value does not satisfy the consistency-checking threshold, the facility determines not to consistency-check the entry.
41 Citations
21 Claims
-
1. A computer-readable medium whose contents cause a computing system to perform a method for managing a cache, the method comprising:
-
receiving a request for an object; if the cache does not contain a cached version of the object; obtaining a current version of the object from a source associated with the object; storing the obtained current version of the object in the cache; attributing a minimum lifetime and a maximum lifetime to the current version of the object based upon the time at which the current version of the object was stored in the cache; using the current version of the object to respond the received request; if the cache contains a cached version of the object; if a minimum lifetime attributed to the cached version of the object has not expired, using the cached version of the object to respond the received request; if the minimum lifetime attributed to the cached version of the object has expired, but a maximum lifetime attributed to the cached version of the object has not expired; determining a random or pseudorandom number within a range; if the determined number exceeds a probability threshold determined with respect to the range, using the cached version of the object to respond the received request; if the maximum lifetime attributed to the cached version of the object has expired, or if the determined number does not exceed the probability threshold; obtaining a current version of the object from the source associated with the object; storing the current version of the object in the cache; attributing a minimum lifetime and a maximum lifetime to the current version of the object based upon the time at which the current version of the object was stored in the cache; and using the current version of the object to respond the received request. - View Dependent Claims (2)
-
-
3. A method in a computing system for determining whether to invalidate at a first time a cache entry whose existing contents were stored at a second time, comprising:
-
adding to the second time a first amount of time to obtain a third time; adding to the second time a second amount of time that is longer than the first amount of time to obtain a fourth time; if the first time is before the third time, determining to use the cache entry without consistency-checking the cache entry; if the first time is after the fourth time, expiring the cache entry; if the first time is between the third and fourth times; randomly or pseudorandomly selecting a value in a range; if the selected value satisfies a consistency-checking threshold within the range, consistency-checking the cache entry; and if the selected value does not satisfy the consistency checking threshold, determining to use the cache entry without consistency-checking the cache entry. - View Dependent Claims (4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A computer-readable medium whose contents cause a computing system to perform a method for determining whether to check the consistency of a cache entry, the method comprising:
-
randomly or pseudorandomly selecting a value in a range; if the selected value satisfies a consistency-checking threshold within the range, consistency-checking the entry; and if the selected value does not satisfy the consistency-checking threshold, determining not to consistency-checking the entry.
-
-
20. One or more computer memories collectively containing a cache management data structure for use in managing a cache entry, comprising:
-
information identifying a time at which a minimum lifetime for the cache entry expires; and information identifying a time at which a maximum lifetime for the cache entry expires, such that it can be determined whether a time at which the cache entry is accessed is before the expiration of the minimum lifetime, after the expiration of the minimum lifetime but before the expiration of the maximum lifetime, or after the expiration of the maximum lifetime, and such that the cache entry may be unconditionally used when accessed before the expiration of the minimum lifetime, the cache entry may be probabilistically consistency-checked when accessed after the expiration of the minimum lifetime but before the expiration of the maximum lifetime, and the cache entry may be unconditionally expired when accessed after the expiration of the maximum lifetime. - View Dependent Claims (21)
-
Specification