mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-28 21:49:40 +02:00
feat(etl-cache): add EvictionCandidate value object
This commit is contained in:
parent
24f824b597
commit
3c9ea0011d
1 changed files with 15 additions and 0 deletions
15
surfsense_backend/app/etl_pipeline/cache/schemas/eviction_candidate.py
vendored
Normal file
15
surfsense_backend/app/etl_pipeline/cache/schemas/eviction_candidate.py
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
"""Row projection handed to the eviction policy."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True, slots=True)
|
||||||
|
class EvictionCandidate:
|
||||||
|
id: int
|
||||||
|
storage_key: str
|
||||||
|
size_bytes: int
|
||||||
|
last_used_at: datetime
|
||||||
|
times_reused: int
|
||||||
Loading…
Add table
Add a link
Reference in a new issue