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 52 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 65 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 76 of file PlainCache.d. References HashMap::get(). Referenced by bind(), and testPlainCache(). |
|
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 92 of file PlainCache.d. References HashMap::put(). Referenced by testPlainCache(). |
|
Remove (and return) the cache entry associated with the provided key. Returns null if there is no such entry. Definition at line 105 of file PlainCache.d. References HashMap::remove(). Referenced by testPlainCache(). |
|
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 117 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 137 of file PlainCache.d. References get(), IPayload::getTime(), ICacheLoader::load(), and ICacheLoader::test(). |
|
Definition at line 54 of file PlainCache.d. |