struct
LLM::Cache::Stats
- LLM::Cache::Stats
- Struct
- Value
- Object
Overview
#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.
Defined in:
llm/cache.crConstructors
Instance Method Summary
- #bytes : Int64
- #clone
- #copy_with(entries _entries = @entries, bytes _bytes = @bytes, oldest _oldest = @oldest, newest _newest = @newest, orphans _orphans = @orphans, orphan_bytes _orphan_bytes = @orphan_bytes)
- #entries : Int32
- #newest : Time | Nil
- #oldest : Time | Nil
- #orphan_bytes : Int64
- #orphans : Int32
Constructor Detail
def self.new(entries : Int32, bytes : Int64, oldest : Time | Nil, newest : Time | Nil, orphans : Int32 = 0, orphan_bytes : Int64 = 0)
#
Instance Method Detail
def copy_with(entries _entries = @entries, bytes _bytes = @bytes, oldest _oldest = @oldest, newest _newest = @newest, orphans _orphans = @orphans, orphan_bytes _orphan_bytes = @orphan_bytes)
#