Opaque object caching
AssigneeMicro Focus LLC
InventorMichael Wojcik
Life of this patent
Estimating the term…
Abstract
A query for opaque objects stored within a data store and not currently cached within a cache is received from an application. The query to the data store is passed to the data store, and a handle to memory location is received from the data store at which the data store has temporarily stored a message including the opaque objects. The opaque objects are added to the cache by treating the memory location as a cache entry for the opaque objects. Cache metadata for the cache entry is generated, and along with the handle is stored within a metadata cache entry of a metadata cache structure separate from the message. The handle and the cache metadata can be returned to the application, where the cache metadata can be returned as an opaque context of the cache entry.
Claims20
A non-transitory computer-readable data storage medium storing program code executable by a processor to perform cache processing comprising:
- receiving, from an application, a query for one or multiple opaque objects stored within a data store and not currently cached within a cache;
- in response to receiving the query from the application, passing the query to the data store;
- in response to passing the query to the data store, receiving, from the data store, a handle to a memory location at which the data store has temporarily stored a message including the one or multiple opaque objects;
- in response to receiving the handle, adding the one or multiple opaque objects to the cache by treating the memory location as a cache entry for the one or multiple opaque objects;
- as part of adding the one or multiple opaque objects to the cache, generating cache metadata for the cache entry, and storing the cache metadata and the handle within a metadata cache entry of a metadata cache structure separate from the message;
- and
- after adding the one or multiple opaque objects to the cache, returning, to the application, the handle.
A system comprising:
- a network adapter communicatively connected to a data store exposing a data retrieval application programming interface (API) by which one or multiple opaque objects stored within the data store are accessible;
- a processor;
- and
- a memory storing:
- a message in which the data store temporarily stores the one or multiple opaque objects, a memory location in the memory at which the message is stored being treated as a cache entry of a cache for the one or multiple opaque objects;
- a metadata cache entry of a metadata cache structure separate from the message and including cache metadata for the cache entry and a handle to the memory location, the cache metadata including a key uniquely identifying a query identifying the one or multiple opaque objects, a creation or expiration time of the cache entry, a last usage time of the cache entry, and an estimated size of the cache entry;
- application program code executable by the processor to implement an application;
- and
- cache processing program code executable by the processor to implement cache processing exposing a cache API by which the one or multiple opaque objects are accessible by the application,
- wherein the cache processing:
- in response to receiving a query from the application via the cache API for the opaque objects, searches the metadata cache structure for the metadata cache entry to locate the cache entry within the cache;
- in response to locating the cache entry within the cache, retrieving the handle and updating the cache metadata for the cache entry stored within the metadata cache entry of the metadata cache structure to reflect a new last usage time of the cache entry;
- and
- after retrieving the handle and updating the cache metadata, returning, to the application via the cache API, the handle.
A method comprising:
- receiving, by cache processing from an application via a cache application programming interface (API) exposed by the cache processing, a query for one or multiple opaque objects stored within a data store and not currently cached within a cache;
- in response to receiving the query from the application via the cache API, passing, by the cache processing, the query to the data store via a data retrieval API exposed by the data store;
- in response to passing the query to the data store via the data retrieval API, receiving, by the cache processing from the data store via the data retrieval API, a handle to a memory location at which the data store has temporarily stored a message including the one or multiple opaque objects;
- in response to receiving the handle, adding, by the cache processing, the one or multiple opaque objects to the cache by treating the memory location as a cache entry for the one or multiple opaque objects;
- as part of adding the one or multiple opaque objects to the cache, generating, by the cache processing, cache metadata for the cache entry, and storing the cache metadata and the handle within a metadata cache entry of a metadata cache structure, the cache metadata including a key uniquely identifying the query, a creation or expiration time of the cache entry, a last usage time of the cache entry, and an estimated size of the cache entry;
- and
- after adding the one or multiple opaque objects to the cache, returning, by the cache processing to the application, the handle.
Dependencies are inferred from the claim text.