FFCache class
Constructors
-
FFCache({String name = _default_name, Duration defaultTimeout = _defaultTimeoutDuration, bool debug = false})
-
Returns a FFCache object.
factory
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
-
ageForKey(String key)
→ Future<Duration?>
-
returns cache entry age (Duration since creation)
-
clear()
→ Future<void>
-
remove all cache entries.
-
getBytes(String key)
→ Future<List<int>?>
-
get bytes(List
-
getJSON(String key)
→ Future
-
get JSON value for key.
-
getString(String key)
→ Future<String?>
-
get string value for key.
-
has(String key)
→ Future<bool>
-
check if cache entry for key exist.
-
init()
→ Future<void>
-
Initialize ffcache.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
remainingDurationForKey(String key)
→ Duration
-
returns cache entry remaining duration for key.
-
remove(String key)
→ Future<bool>
-
remove cache entry for key
-
setBytes(String key, List<int> bytes)
→ Future<void>
-
store (key, bytes) pair. cache expires after defaultTimeout.
-
setBytesWithTimeout(String key, List<int> bytes, Duration timeout)
→ Future<void>
-
store (key, bytes) pair. cache expires after timeout.
-
setJSON(String key, dynamic data)
→ Future<void>
-
store (key, jsonData) pair. cache expires after defaultTimeout.
-
setJSONWithTimeout(String key, dynamic data, Duration timeout)
→ Future<void>
-
store (key, jsonData) pair. cache expires after timeout.
-
setString(String key, String value)
→ Future<void>
-
store (key, stringValue) pair. cache expires after defaultTimeout.
-
setStringWithTimeout(String key, String value, Duration timeout)
→ Future<void>
-
store (key, stringValue) pair. cache expires after timeout.
-
toString()
→ String
-
A string representation of this object.
inherited