v3.9.0 Codeberg

Settings

Options are passed when the ferncache client is created. Every option is optional; the defaults suit most applications.

Options

OptionTypeDefaultDescription
max_entriesu6410_000Maximum number of entries. Zero means no limit (use cost instead).
default_ttlDuration5mTime-to-live applied to inserts without an explicit TTL.
shardsu6464Number of shards. Must be a power of two.
max_costu6467_108_864Upper bound for the summed cost of all entries.
record_statsbooltrueCollect hit, miss and eviction counters.
cleanup_intervalDuration1mHow often idle shards are swept for expired entries.

Durations are given in std::time::Duration.