AssetCache class abstract

A cache for storing resources.

Note: It is used by loadAsset and AssetLoader and derives. ResourceLoader doesn't depend on it.

Constructors

AssetCache()

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

getContent(Asset asset, DateTime lastModified) List<int>?
Returns the content of asset, or null if not cached or expires (unit: bytes) .
getETag(Asset asset, DateTime lastModified, int assetSize) String?
Returns the value of the ETag header. If null is returned, ETag header
getExpires(Asset asset) Duration?
Returns the duration for the Expires and max-age headers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setContent(Asset asset, DateTime lastModified, List<int> content) → void
Stores the content of the asset (unit: bytes) into the cache.
shallCache(Asset asset, int assetSize) bool
Whether the given asset shall be cached. *
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited