NyCache class
Cache helper
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
-
clear(
String key) → Future< void> - Removes a specific item from the cache.
-
documents(
) → Future< List< String> > - Retrieves a list of all cache keys.
-
flush(
) → Future< void> - Removes all items from the cache.
-
get<
T> (String key) → Future< T?> - Retrieves a value from the cache.
-
has(
String key) → Future< bool> - Checks if a specific key exists in the cache.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put<
T> (String key, T value, {int? seconds}) → Future< void> - Stores a value in the cache.
-
saveForever<
T> (String key, Future< T> callback()) → Future - Saves a value in the cache without an expiration time.
-
saveRemember<
T> (String key, int seconds, dynamic callback()) → Future - Saves a value in the cache with an expiration time.
-
size(
) → Future< int> - Calculates the total size of the cache in bytes.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getInstance(
) → Future< NyCache>