Abstract
Internal
Gets a cache resource
If info
is set and the resource doesn't exist, it will be created
Optional
info: { size: number }Protected
asyncInternal
Run a asynchronous operation from a sync context. Not magic and subject to (race) conditions.
Abstract
getRetrieves data.
The key to look under for data.
Optional
end: numberRetrieves data. Throws an error if an error occurs or if the key does not exist.
The key to look under for data.
Optional
end: numberThe data stored under the key, or undefined if not present.
Abstract
keysGets all of the keys
Abstract
removeDeletes the data at ino
.
The key to delete from the store.
Deletes the data at ino
.
The key to delete from the store.
Abstract
setAdds the data to the store under an id. Overwrites any existing data.
The key to add the data under.
The data to add to the store.
Adds the data to the store under and id.
The key to add the data under.
The data to add to the store.
Transaction that implements synchronous operations with a cache Implementors: You must update the cache and wait for
store.asyncDone
in your asynchronous methods.Todo
Make sure we handle abortions correctly, especially since the cache is shared between transactions.