ServiceWorkerCacheEntry<T> class

The cache entry for a url in a service worker.

Inheritance

Constructors

ServiceWorkerCacheEntry({@required String name, @required String url, Duration maxAge, bool binary: false, Parser<T> parser})

Properties

binary → bool
The data is either in bytes or a string.
final
cache → Future<Cache>
read-only
exists → Future<bool>
read-only, override
isExpired → Future<bool>
read-only
lastModified → Future<DateTime>
Returns null if exists is false.
read-only, override
maxAge → Duration
final
name → String
The name of the cache to use.
final
response → Future<Response>
read-only
url → String
read-only
basename → String
The basename() of the path.
read-only, inherited
data → T
Synchronously get the most recently loaded data.
read-only, inherited
hashCode → int
The hash code for this object.
read-only, inherited
location → String
The location (a path or url) of the resource.
final, inherited
parser Parser<T>
final, inherited
path → String
This resource's path on the system.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

delete() → Future<void>
Remove this resource from disk and sets data to null. [...]
override
fetchContents() → Future
Fetch the raw contents from the underlying platform. [...]
override
preParseContents(dynamic contents) → dynamic
For internal parsing before calling parseContents.
override
write(dynamic resp) → Future<T>
contents must be of type sw.Response.
override
get({bool forceReload: false}) → Future<T>
Gets the most readily available data or refreshes it if forceReload is true.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
parseContents(dynamic contents) → T
contents is a String or List<int>, depending on whether the underlying resource is binary or string based. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited