From 3c9ea0011d2dd0b9ccf75e2b46de279eef610d63 Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Fri, 12 Jun 2026 11:22:48 +0200 Subject: [PATCH] feat(etl-cache): add EvictionCandidate value object --- .../cache/schemas/eviction_candidate.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 surfsense_backend/app/etl_pipeline/cache/schemas/eviction_candidate.py diff --git a/surfsense_backend/app/etl_pipeline/cache/schemas/eviction_candidate.py b/surfsense_backend/app/etl_pipeline/cache/schemas/eviction_candidate.py new file mode 100644 index 000000000..13a903e7d --- /dev/null +++ b/surfsense_backend/app/etl_pipeline/cache/schemas/eviction_candidate.py @@ -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