InMemoryCache<T> class

In memory cache implementation

Implemented types

Constructors

InMemoryCache(Duration defaultExpiry)

Properties

defaultExpiry → Duration
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clear() → void
Wipes all data in the cache
override
read(String key) → T
Get the content associated with the given key
override
readMany(List<String> keys) → List<T>
Get the content associated multiple keys at once
override
remove(String key) → void
Deletes the given key from the cache
override
replace(String key, T value, [ Duration expires ]) → void
Set the given key/value in the cache ONLY IF the key already exists.
override
upsert(String key, T value, [ Duration expires ]) → void
Set the given key/value in the cache, overwriting any existing value associated with that key
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited