InMemoryCache

org.eso.ias.utils.pcache.InMemoryCache

The interface for the in-memory cache

This interface is te same as NonVolatileCache: we keep both as they might diverge in future and reduce teh chance of errors instantiating the higher level cache

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def clear(): Unit

Empty the cache

Empty the cache

Attributes

def del(key: String): Boolean

Remove an object from the cache

Remove an object from the cache

Value parameters

key

The key of the object to remove

Attributes

Returns

True if the object has been removed, False otherwise (for example the object was not in the cache)

def get(key: String): Option[String]

Get an object from the cache

Get an object from the cache

Attributes

Returns

The Object in the cache if it exists, empty otherwise

def keySet: Set[String]

Collects all keys of this map in a set

Collects all keys of this map in a set

Attributes

def put(key: String, value: String): Boolean

Puts/update a value in the cache

Puts/update a value in the cache

Value parameters

key

The unique key to identify the object

value

: The string to store in the cache

Attributes

Returns

true if the object has been stored in the cache, false otherwise

def size: Int

Attributes

Returns

the number of objects in the cache