Inheritance diagram for PlainCache:
Public Member Functions | |
this (uint capacity=101, uint concurrency=16) | |
IPayload | get (char[] key) |
IPayload | put (char[] key, IPayload entry) |
IPayload | extract (char[] key) |
IPayload | extract (char[] key, ulong timeLimit) |
ICache | bind (ICacheLoader loader) |
Private Attributes | |
HashMap | map |
Definition at line 55 of file PlainCache.d.
|
Construct a basic cache with the specified number of preallocated entries. The concurrency level indicates approximately how many threads will content for write access at one time. Reimplemented in QueuedCache. Definition at line 68 of file PlainCache.d. References HashMap. |
|
Get the cache entry identified by the given key Reimplemented from ICache. Reimplemented in QueuedCache, and VirtualCache. Definition at line 79 of file PlainCache.d. References HashMap::get(). Referenced by bind(). |
|
Place an entry into the cache and associate it with the provided key. Note that there can be only one entry for any particular key. If two keys entries are added with the same key, the second effectively overwrites the first. Returns what it was given Reimplemented from IMutableCache. Reimplemented in QueuedCache, and VirtualCache. Definition at line 95 of file PlainCache.d. References HashMap::put(). |
|
Remove (and return) the cache entry associated with the provided key. Returns null if there is no such entry. Definition at line 108 of file PlainCache.d. References HashMap::remove(). |
|
Remove (and return) the cache entry associated with the provided key. Returns null if there is no such entry. Reimplemented from IMutableCache. Reimplemented in QueuedCache, and VirtualCache. Definition at line 120 of file PlainCache.d. References HashMap::get(), IPayload::getTime(), and HashMap::remove(). |
|
This is a factory for producing an ICache instance upon the cache content. The provided loader will populate the cache whenever a stale or missing entry is seen Reimplemented from IMutableCache. Definition at line 140 of file PlainCache.d. References get(), IPayload::getTime(), ICacheLoader::load(), and ICacheLoader::test(). |
|
Definition at line 57 of file PlainCache.d. |