struct

LLM::Cache::Stats

Inherits Struct < Value < Object

orphans/orphan_bytes are tracked apart from entries/bytes so entries keeps counting usable cached responses while the reported footprint can still account for every byte the cache occupies. Stranded temp files also stay out of oldest/newest, which describe the age of the usable cache.

Constructors

new(entries : Int32, bytes : Int64, oldest : Time | Nil, newest : Time | Nil, orphans : Int32 = 0, orphan_bytes : Int64 = 0)
Source

Instance methods

bytes
clone
Source
copy_with(entries _entries = @entries, bytes _bytes = @bytes, oldest _oldest = @oldest, newest _newest = @newest, orphans _orphans = @orphans, orphan_bytes _orphan_bytes = @orphan_bytes)
Source
entries
newest
oldest
orphan_bytes
orphans