PlexCacheLayer class
Cache layer for GET responses using PlexDb/Sembast.
Constructors
- PlexCacheLayer(PlexCacheConfig config, PlexDb db)
Properties
- config → PlexCacheConfig
-
final
- db → PlexDb
-
final
- 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? urlPattern}) → Future< void> -
Clear cache entries. If
urlPatternis provided, only matching keys are cleared. -
get(
String url, Map< String, dynamic> ? query) → Future<String?> - Get cached response if fresh. Returns the cached body string or null if miss/stale.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
String url, Map< String, dynamic> ? query, String body) → Future<void> -
Store a successful GET response.
bodyis the raw response string (e.g. JSON). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited