AlfredCache<T> class
base
Constructors
-
AlfredCache({required T fromEncodable(Map<String, dynamic>), String? path, int maxEntries = 10, String name = 'query_cache', EvictionPolicy evictionPolicy = const LruEvictionPolicy(), ExpiryPolicy expiryPolicy = const CreatedExpiryPolicy(Duration(minutes: 1)), bool verbose = false})
-
Builds an AlfredCache providing a
Cache
backed by a Store
Properties
-
cache
→ Future<Cache<T>>
-
The
Cache
backed by a Store
latefinal
-
evictionPolicy
→ EvictionPolicy
-
Defines the eviction policy contract that every cache eviction algorithm should implement
final
-
expiryPolicy
→ ExpiryPolicy
-
Defines functions to determine when cache entries will expire based on
creation, access and modification operations.
final
-
fromEncodable
→ T Function(Map<String, dynamic>)
-
A custom function the converts to the object from a
Map<String, dynamic>
representation
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
maxEntries
→ int
-
The max number of entries this cache can hold if provided. To trigger the eviction policy this value should be provided
final
-
name
→ String
-
The name of the cache
final
-
path
→ String?
-
The base storage location for this store
final
-
props
→ List<Object?>
-
The list of properties that will be used to determine whether
two instances are equal.
no setter
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
store
→ Future<FileCacheStore>
-
The local
FileCacheStore
latefinal
-
stringify
→ bool?
-
If set to
true
, the toString method will be overridden to output
this instance's props.
no setterinherited
-
verbose
→ bool
-
If verbose = true then listeners will print events to the developer log
final
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited