Skip to content

Implement query memoization layer for hot filtered queries #24

@nicmostert

Description

@nicmostert

Overview

Implement the query memoization layer for whurl. This layer caches results of filtered, expensive queries (e.g., measurement filters) for a short time, to speed up repeated queries and reduce computation.

Acceptance Criteria

  • Memoize results of filtered queries derived from canonical caches (sites, measurements).
  • Use small, short-lived LRU cache for hot query results (TTL 1-5 minutes).
  • Key memoized results by query parameters (function name + normalized filters).
  • Do not persist memoized queries across client restarts; memory-only.
  • Evict frequently to avoid stale data or cache explosion.
  • Expose API for cache clearing/invalidation.
  • Document use cases, TTLs, and limitations.
  • Comprehensive tests for correctness, cache hits/misses, and performance improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions