Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

IMutableCache Struct Reference

Inheritance diagram for IMutableCache:

ICache PlainCache QueuedCache VirtualCache List of all members.

Public Member Functions

IPayload put (char[] key, IPayload entry)
IPayload extract (char[] key, ulong timeLimit=ulong.max)
ICache bind (ICacheLoader loader)
IPayload get (char[] key)

Detailed Description

Defines what a modifiable cache instance exposes

Definition at line 65 of file ICache.d.


Member Function Documentation

IPayload put char[]  key,
IPayload  entry
 

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 in PlainCache, QueuedCache, and VirtualCache.

Referenced by NetworkCombo::get(), and NetworkCombo::put().

IPayload extract char[]  key,
ulong  timeLimit = ulong.max
 

Remove (and return) the cache entry associated with the provided key. The entry will not be removed if it's time attribute is newer than the (optional) specified 'timelimit'.

Returns null if there is no such entry.

Reimplemented in PlainCache, QueuedCache, and VirtualCache.

Referenced by CacheInvalidatee::notify().

ICache bind ICacheLoader  loader  ) 
 

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 in PlainCache.

Referenced by testCacheLoader().

IPayload get char[]  key  )  [inherited]
 

Get the cache entry identified by the given key

Reimplemented in PlainCache, QueuedCache, VirtualCache, and NetworkCache::LocalLoader.

Referenced by NetworkCombo::get(), testCacheLoader(), and testRemoteCacheLoader().


The documentation for this struct was generated from the following file:
Generated on Sun Nov 7 19:07:05 2004 for Mango by doxygen 1.3.6