DVPageDataCache class
The kept pages the modes work on: one per path, with when it was kept.
In this process by default. Given a shared store -- any DVCacheAdapter, so redis on a deployment that has one -- the pages go there instead, and the next server serves what this one kept rather than resolving every page for itself. A page is fresh for ttl and servable stale for staleFor after that; past both it is gone rather than served as a page from an hour ago.
Constructors
- DVPageDataCache({Duration ttl = const Duration(seconds: 60), Duration? staleFor, DateTime now()?, String prefix = 'dv:page:'})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- prefix → String
-
What the shared store's keys begin with, so pages cannot collide with
whatever else the application keeps there.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Where the pages are kept, when they are not kept in this process.
final
- staleFor → Duration
-
How long past ttl a page may still be served while it is refreshed.
final
- ttl → Duration
-
final
Methods
-
clear(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
DVPageRequest request, DVPageDataResolver resolver, DVPageDataMode mode) → Future< DVPageData?> -
The data for
requestbymode: resolved, kept, served stale, or not asked for at all. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited