-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Overview
Implement the domain-layer cache for whurl. This layer stores canonical, unfiltered site and measurement lists in memory, and powers fast existence checks and index queries.
Acceptance Criteria
- Store full site and measurement lists as normalized indexes (e.g., name→id, id→metadata).
- Implement API:
client.list_all_sites(refresh=False): Returns cached or refreshed site list.client.check_for_site(name, refresh=False): Returns True if site exists in cached index.client.get_site(name): Returns site metadata by name.client.list_all_measurements(refresh=False): Returns measurements.client.refresh_sites(),client.refresh_measurements(): Explicit refresh methods.
- Normalize names (case, whitespace, optional ASCII fold).
- Refresh logic should prefer ETag/Last-Modified revalidation from backing HTTP resource if available.
- Document cache structure, TTLs, and invalidation logic.
- Comprehensive tests for cache correctness, refresh, and API.
Copilot
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request