MetadataCache class
A cache for storing and retrieving extracted metadata
Constructors
-
MetadataCache.new({Box<
String> ? box, String keyPrefix = 'metalink_cache_', int defaultTtlMs = 14400000}) - Creates a new instance of MetadataCache
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(
) → Future< void> - Clears all cached metadata
-
get(
String url) → Future< LinkMetadata?> - Gets metadata from the cache for the given URL
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
String url, LinkMetadata metadata, {int? ttlMs}) → Future< void> - Puts metadata in the cache for the given URL
-
remove(
String url) → Future< bool> - Removes metadata from the cache for the given URL
-
removeExpired(
) → Future< int> - Removes all expired items from the cache
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited