MODULE 02 // LAYER ARCHITECTURE
MODULE 05 // CACHING STRATEGIES

Intelligent Caching.

Caching ABIS responses reduces latency and API costs. But cache behavioral data incorrectly, and you'll miss real-time threats. Balance freshness with performance.

CACHE STRATEGY PATTERNS

Behavioral intelligence is inherently time-sensitive—a user's risk profile can change within minutes. Caching must balance two competing forces: performance optimization (reduce API calls) and data freshness (detect emerging threats).

Critical decisions: what to cache (user baselines vs real-time scores), cache duration (TTL based on risk level), cache key design (user+session+action composite keys), and invalidation triggers (manual invalidation after high-risk events).

Advanced patterns include: write-through caching (update cache after ABIS calls), probabilistic early expiration (refresh before TTL expires), and cache warming (pre-populate cache for known users during off-peak hours).

USER BASELINE CACHE

Cache user behavioral patterns and historical risk profiles. These change slowly and are expensive to recalculate.

TTL: 24 HOURS

DEVICE FINGERPRINT CACHE

Cache device reputation scores. Devices rarely change characteristics within a session.

TTL: 12 HOURS

REAL-TIME RISK CACHE

Short-lived cache of recent risk assessments. Valid only within same session for identical actions.

TTL: 5 MINUTES

GEO/IP REPUTATION

Cache IP address reputation and geographic risk factors. These change infrequently.

TTL: 6 HOURS
KNOWLEDGE CHECK // Q05
Why should real-time risk scores have shorter cache TTLs than user baseline data?