v0.1.4 — caching (@Cacheable/@CacheEvict)
Adds annotation-driven caching (#32, PR #50).
Runtime
runtime.Cache(Get/Set/Delete with per-entry TTL) +MemoryCache, the in-process default wired intoProxyDependencies.
@Cacheable / @CacheEvict
On an interface-backed service method:
@Cacheable(key="user:#{id}", ttl="1m")— read-through: cached value on a hit (target skipped), stored on a miss. Method must return(T, error); value is JSON-serialized. Key#{param}placeholders resolve to method arguments.@CacheEvict(key="…")— invalidates the entry after the method succeeds.
New module: adapters/redis (adapters/redis/v0.1.0)
runtime.Cache over redis/go-redis/v9 (WithPrefix, nil→miss, ttl 0 → no expiry). Install: go get github.com/zombocoder/goboot/adapters/redis@v0.1.0 (requires core v0.1.4).
Full coverage incl. an e2e proving hit-skips-target / evict-invalidates and a miniredis-backed adapter test.