osint-dashboard/app/upstream_cache.py
Sirius DevOps 5ea9a4e879 feat: lean-Pi WS fan-out, geofences, DVR playback, fire/aircraft correlation
Phase 1: in-memory ConnectionManager viewport fan-out, 500ms map debounce,
cachetools TTLCache, background masscan/ffmpeg, compose memory caps.

Phase 2: PostGIS geofences + ST_Intersects alerts, Timescale 1-min CAGGs
and timestamp playback, FIRMS/WFIGS x firefighting ADS-B within 20 miles.

No Redis/Kafka/Celery.
2026-08-28 09:35:18 -04:00

11 lines
412 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""In-process TTL caches for chatty upstreams (FIRMS, RSS). No Redis."""
from __future__ import annotations
from cachetools import TTLCache
# FIRMS NRT updates every ~510 min; 5 min / 100 keys is enough for bbox×dataset.
firms_cache: TTLCache = TTLCache(maxsize=100, ttl=300)
# News RSS: 1 minute is enough to absorb dashboard double-clicks / retries.
rss_cache: TTLCache = TTLCache(maxsize=100, ttl=60)