CacheManager class
Simple in-memory and persistent cache manager for scraped content
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> - Clear all cached content
-
contains(
String url) → Future< bool> - Check if URL is cached and valid
-
get(
String url) → Future< String?> - Get cached content for a URL
-
getStats(
) → CacheStats - Get cache statistics
-
initialize(
{CacheConfig? config}) → Future< void> - Initialize the cache manager
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String url) → Future< void> - Remove specific URL from cache
-
set(
String url, String content, {Duration? expiry}) → Future< void> - Cache content for a URL
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → CacheManager
-
no setter