MemoryCacheDriver class

A simple, in-memory cache driver.

Note: Items are only cleared when accessed or on flush.

Implemented types

Constructors

MemoryCacheDriver()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decrement(String key, [int value = 1]) Future<int>
Decrements the value of an item in the cache.
override
flush() Future<void>
Removes all items from the cache.
override
forget(String key) Future<void>
Removes an item from the cache.
override
get(String key) Future
Retrieves an item from the cache.
override
has(String key) Future<bool>
Determines if an item exists in the cache.
override
increment(String key, [int value = 1]) Future<int>
Increments the value of an item in the cache.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String key, dynamic value, {Duration? ttl}) Future<void>
Stores an item in the cache for a given duration.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited