Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,48 @@ This document tracks the planned evolution of SafeMemoize through v1.0.0 and bey

---

## v1.4.0 — Developer Experience

*Goal: reduce boilerplate for classes with many memoized methods and add a safety rail for shared mutable cached values.*

| Feature | Description | Status |
|---|---|---|
| Per-class default options | `safe_memoize_options ttl: 60, max_size: 100` class-level macro that sets option defaults shared by every `memoize` call on the class; per-call options still override | Planned |
| Copy-on-read | `memoize :config, copy_on_read: true` — returns a `dup` (or `deep_dup` when available) of the cached value on every read, preventing callers from mutating shared cached state | Planned |

---

## v1.5.0 — Cache Invalidation

*Goal: group-level cache invalidation so related methods can be busted in one operation.*

| Feature | Description | Status |
|---|---|---|
| Memoization groups | `memoize :find, group: :database` then `reset_memo_group(:database)` to invalidate all methods tagged with the same group at once; groups can span multiple methods on the same class | Planned |

---

## v1.6.0 — Resilience

*Goal: make external-store memoization resilient to infrastructure failures.*

| Feature | Description | Status |
|---|---|---|
| Circuit breaker for external stores | When a `store:` adapter raises on `read` or `write`, automatically fall back to the per-instance in-process hash rather than propagating the exception; configurable error threshold and recovery probe interval | Planned |

---

## v1.7.0 — Advanced Store Features

*Goal: multi-process performance patterns for high-traffic deployments.*

| Feature | Description | Status |
|---|---|---|
| Multi-level (L1/L2) caching | `store: [memory_store, redis_store]` — check in-process first, fall back to the remote store on miss, and promote to L1 on read; each level can have independent TTL and eviction settings | Planned |
| Stampede protection | Probabilistic early expiry (XFetch algorithm) for external stores; recomputes slightly before a TTL expires to prevent multiple processes hitting a cold miss simultaneously | Planned |

---

## v2.0.0 — Next Generation (Long Horizon)

*Goal: incorporate real-world usage feedback, clean up accumulated API surface, and open a path for advanced extension.*
Expand Down
Loading