MemoryLruGcSettings class final

Least recently used garbage collection: the memory cache is collected once it exceeds sizeBytes, starting with the least recently used data.

Unlike eager collection, documents stay in the cache after their last listener stopped, so a later read or listener can be answered from the cache while offline.

final Settings settings = Settings(
  cacheSettings: MemoryCacheSettings(
    gcSettings: MemoryLruGcSettings(sizeBytes: 10 * 1024 * 1024),
  ),
);
Inheritance

Constructors

MemoryLruGcSettings({int sizeBytes = Settings.defaultCacheSizeBytes})
sizeBytes is an approximate threshold, see PersistentCacheSettings.sizeBytes for the accepted values.

Properties

hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizeBytes → int
The cache size threshold, in bytes.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override