CacheService class

Stores cached pub.dev and GitHub responses on disk.

Constructors

CacheService(FileSystemAdapter _fs)
Creates a cache service.
const

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String cacheDir, String namespace, String key, {required Duration ttl}) String?
Reads a cached payload if it exists and is younger than ttl.
toString() String
A string representation of this object.
inherited
write(String cacheDir, String namespace, String key, String payload) → void
Writes payload to the cache namespace and key.

Operators

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