Skip to main content

Module ttl

Module ttl 

Source
Expand description

TTL (Time-to-Live) Management for Automatic Vector Expiration

This module provides:

  • Background cleanup service for expired vectors
  • Namespace-specific TTL policies
  • Configurable cleanup intervals and batch sizes
  • Statistics tracking and monitoring
  • Graceful shutdown support

Structs§

NamespaceCleanupStats
Per-namespace cleanup statistics
NamespaceTtlPolicy
TTL policy for a specific namespace
TtlAwareStorage
A wrapper that applies TTL policies and tracks expiration on upsert
TtlCleanupResult
Result of a TTL cleanup operation
TtlConfig
Configuration for TTL cleanup service
TtlManager
TTL Manager for coordinating automatic vector expiration
TtlService
Background TTL cleanup service
TtlStats
Statistics for TTL cleanup operations

Functions§

calculate_expiration
Calculate expiration timestamp from TTL
is_expired
Check if a timestamp has expired
remaining_ttl
Get remaining TTL from expiration timestamp