Lock-free weak-reference hybrid cache
AssigneeInternational Business Machines Corporation
InventorTakanori Ueda
Life of this patent
Estimating the term…
Abstract
A computer-implemented method is presented for caching content. The method includes storing content received from a data stream, employing a cache array and a retrieval data structure to process the content, determining, by the processor, if the content is popular content which appears frequently, a position in the cache array holding a strong reference to the content, determining, by the processor, if the content is unpopular content which appears infrequently, an arbitrary position in the cache array holding a strong reference to the unpopular content, the retrieval data structure holding a weak reference to the content, and issuing cached content to a cache data storage device accessed by a user interface of a computing device communicating with the data processing system.
Claims20
A computer-implemented method executed on a processor in a data processing system for caching content, the computer-implemented method comprising:
- storing content received from a data stream;
- employing a cache array and a retrieval data structure to store the content;
- determining, by the processor, whether the content is popular content or unpopular content;
- storing the popular content and the unpopular content with strong references in specific locations within the cache array, the cache array providing for low latency access, wherein the cache array is used to directly locate and retrieve the popular content and is used by an eviction mechanism for both the popular and unpopular content;
- storing the unpopular content with weak references randomly in the retrieval data structure, the retrieval data structure providing higher latency than the cache array, wherein the retrieval data structure is used to locate and retrieve the unpopular content;
- and
- after assigning the content into either the cache array or the retrieval data structure based on accessibility requirements of the content, issuing the assigned content to a cache data storage device accessed by a user interface of a computing device communicating with the data processing system.
A non-transitory computer-readable storage medium comprising a computer-readable program executed on a processor in a data processing system for caching content, wherein the computer-readable program when executed on the processor causes a computer to perform the steps of:
- storing content received from a data stream;
- employing a cache array and a retrieval data structure to store the content;
- determining, by the processor, whether the content is popular content or unpopular content;
- storing the popular content and the unpopular content with strong references in specific locations within the cache array, the cache array providing for low latency access, wherein the cache array is used to directly locate and retrieve the popular content and is used by an eviction mechanism for both the popular and unpopular content;
- storing the unpopular content with weak references randomly in the retrieval data structure, the retrieval data structure providing higher latency than the cache array, wherein the retrieval data structure is used to locate and retrieve the unpopular content;
- and
- after assigning the content into either the cache array or the retrieval data structure based on accessibility requirements of the content, issuing the assigned content to a cache data storage device accessed by a user interface of a computing device communicating with the data processing system.
A system for caching content, the system comprising:
- a memory;
- and
- one or more processors in communication with the memory configured to:
- store content received from a data stream;
- employ a cache array and a retrieval data structure to store the content;
- determine, by the processor, whether the content is popular content or unpopular content;
- store the popular content and the unpopular content with strong references in specific locations within the cache array, the cache array providing for low latency access, wherein the cache array is used to directly locate and retrieve the popular content and is used by an eviction mechanism for both the popular and unpopular content;
- store the unpopular content with weak references randomly in the retrieval data structure, the retrieval data structure providing higher latency than the cache array, wherein the retrieval data structure is used to locate and retrieve the unpopular content;
- and
- after assigning the content into either the cache array or the retrieval data structure based on accessibility requirements of the content, issue the assigned content to a cache data storage device accessed by a user interface of a computing device communicating with the data processing system.
Dependencies are inferred from the claim text.