cachette library

Classes

CacheEntry<K, V, U extends Object>
A cache entry, containing a key, value and some metadata.
CacheFullError
Occurs if the cache is full and the eviction policy is dontEvict.
CachetteBase<K, V extends Object, U extends Object>
The base class for Cachette implementations. You should probably use Cachette or UserCachette.
CachetteError
Parent class for Cachette related errors.
CachetteException
Exceptions related to Cachette.
EntryInfo<K, U extends Object>
Used internally to hold cache entry metadata within Cachette.
KeyConflictError<K>
Occurs if an attempt is made to add an item to the cache, whose key is already in use, and the conflict policy is error.
NotFoundError<K>
Occurs if a queried key was not found in the cache.
UserCachette<K, V extends Object, U extends Object>
A Cachette that allows you to establish user type bounds.

Enums

ConflictPolicy
Policies that determine what happens if a key conflict happens. overwrite: The new value overwrites the old value. error: An error is returned when trying to add a key that already exists. exception: An exception is thrown. users: The same as overwrite, but the users list for the entry will be modified if appropriate.
EvictionPolicy
Policies that can be used to determine which entries are evicted as the cache size limit is reached.

Typedefs

Cachette<K, V extends Object> = CachetteBase<K, V, Object>
A simple in-memory cache.
GatherFunction<K> = List<K> Function(int num)
Returns num keys.