DiskLruCache class

Implemented types

Constructors

DiskLruCache({Directory directory, int maxSize: 20 * 1024 * 1024, int filesCount: 2, int opCompactThreshold: MAX_OP_COUNT })

Properties

directory → Directory
directory to store caches
final
maxSize → int
The maximum number of bytes that this cache should use to store its data.
final
opCompactThreshold → int
final
size → int
read-only
values → Future<Iterable<CacheEntry>>
make copy of current values
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clean() → Future
close() → Future
Close the cache, do some clean stuff, it is an error to use cache when cache is closed.
override
edit(String key, { int sequenceNumber: ANY_SEQUENCE_NUMBER }) → Future<CacheEditor>
get(String key) → Future<CacheSnapshot>
Returns a snapshot of the entry named key, or null if it doesn't exist is not currently readable. If a value is returned, it is moved to the tail of the LRU queue.
remove(String key) → Future<bool>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

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

Constants

ANY_SEQUENCE_NUMBER → const int
-1
CLEAN → const String
"CLEAN"
DIRTY → const String
"DIRTY"
MAGIC → const String
"dart.lrucache"
MAX_OP_COUNT → const int
2000
READ → const String
"READ"
REMOVE → const String
"REMOVE"
VERSION → const String
"0.0.1"