Interface Cache
access this type via: data.Cache (provides, requires or uses)
Cache data in a fixed-sized amount of memory, for rapid retrieval.
Functions
Cache(int maxSize)
void setSize(int maxSize)
byte[] get(char key[])
void put(char key[], byte value[])
void delete(char key[])
Cache(int maxSize)
Instantiate a new cache, with a given maximum size in bytes.
void setSize(int maxSize)
Set the maximum size of the cache, specified in bytes. Items may be evicted if the new maximum size is smaller than the existing value.
byte[] get(char key[])
Get an item from the cache, if it exists.
void put(char key[], byte value[])
Put an item into the cache. If an item of the same key already exists, it is overwitten with this version. Items may be evicted from the cache to make space for the new item.
void delete(char key[])
Remove an item from the cache, if it exists.