Cache with time-based purging and computation of purged items
AssigneeSap SE
InventorMartin Moser
Life of this patent
Estimating the term…
Abstract
Methods and apparatus, including computer program products, for purging an item from a cache based on the expiration of a period of time and having an associated process to generate an item purged from the cache. A program stores a first item in a cache with an indication of a process to generate the first item, schedules a validity period for the first item, and purges the first item from the cache when the validity period has expired. The validity period may be optimized to be less than a period of time after which the first item would be promoted from a first generation of the cache to a second generation of the cache and invalid objects in the first generation of the cache are freed from memory more frequently than invalid objects in the second generation of the cache.
Claims16
A computer program product embodied on tangible storage media, the computer program product comprising instructions operable to cause data processing apparatus to:
- store a first item in a cache with an indication of a process to generate the first item;
- schedule a validity period for the first item, wherein:
- the validity period is optimized to be less than a period of time after which the first item would be promoted from a first generation of the cache to a second generation of the cache,
- invalid objects in the first generation of the cache are freed from memory more frequently than invalid objects in the second generation of the cache;
- track a number of accesses to the first item in the cache;
- and
- purge the first item from the cache when the validity period has expired and a number of accesses to the first item is below a threshold number.
A computer program product embodied on tangible storage media, the computer program product comprising instructions operable to cause data processing apparatus to:
- initiate storage of a first item in a cache with an indication of a process to generate the first item, wherein a validity period is associated with the first item and the validity period defines a time interval during which the first item is to be retained in the cache so long as there is sufficient free space available to retain the first item;
- track a number of accesses to the first item in the cache;
- purge the first item from the cache in response to a determination to purge the first item from the cache, the determination based on the expiration of the validity period and a number of accesses to the first item being below a threshold number wherein the validity period is optimized to be less than a period of time after which the first item would be promoted from a first generation of the cache to a second generation of the cache, and invalid objects in the first generation of the cache are freed from memory more frequently than invalid objects in the second generation of the cache.
A computer program product embodied on tangible storage media, the computer program product comprising instructions operable to cause data processing apparatus to:
- store a first item in a cache with an indication of a process to generate the first item;
- schedule a validity period for the first item, wherein:
- the validity period is optimized to be less than a period of time after which the first item would be promoted from a first generation of the cache to a second generation of the cache,
- a minor garbage collection process frees invalid objects in the first generation of the cache from memory and a major garbage collection process frees invalid objects in both the first and second generations of the cache from memory, the minor garbage collection process occurring more frequently than the major garbage collection process, the major garbage collection process requiring more system resources than the minor garbage collection process and;
- purge the first item from the cache when the validity period has expired.
Dependencies are inferred from the claim text.