You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The root correctly retains backend-neutral serializer, metrics, and semantic Redis contracts needed for dependency injection. Vendor-specific adapters and the Redis protocol use explicit package subpaths.
Draft #89 is now based on v0.11.0, mergeable, and green. It clarifies the everyday API, advanced integration contracts, and lower-level reference material, but it is documentation-only and does not resolve this issue.
Prometheus and Datadog subpaths expose both adapter classes and one-line factory functions. Supporting two equivalent construction idioms adds API without adding capability.
The root exports RedisConfig from src/internal/redis-cache.ts. The contract may be intentional, but a public type should live behind a public module boundary rather than making internal part of the source-level API architecture.
redisClusterHashTag("") returns "{}"; Redis does not treat an empty brace pair as an effective cluster hash tag. The helper should either reject an empty value or cease to be a public supported helper.
DialCacheKeyConfig.enabled(ttlSec) enables both local and remote layers at 100%. That shorthand can broaden behavior when Redis is later configured and is less explicit than the normal layer-map API. Decide whether to remove it, rename it to make both layers explicit, or retain it with a strong contract before v1.
The root mixes everyday API with lower-level context, key, metrics, serializer, and semantic Redis contracts. Some are necessary public types—for example, DialCacheKey is the input to CacheConfigProvider—while others still need an explicit supported-consumer justification.
The new cached-definition snapshot, runtime key validation, and CommonJS error-identity findings are tracked separately because they are correctness/package-runtime work rather than export-inventory decisions:
Priority
P2 — Medium — finish the stable public/package boundary before v1; not a production correctness blocker.
Current state at v0.11.0
Most of the original surface-area cleanup has shipped:
MissingKeyConfigErrorexport.getOrLoad()as an intentional everyday root API.The root correctly retains backend-neutral serializer, metrics, and semantic Redis contracts needed for dependency injection. Vendor-specific adapters and the Redis protocol use explicit package subpaths.
Draft #89 is now based on
v0.11.0, mergeable, and green. It clarifies the everyday API, advanced integration contracts, and lower-level reference material, but it is documentation-only and does not resolve this issue.Current evidence:
DialCache/src/dialcache.ts
Lines 234 to 248 in e06d833
DialCache/package.json
Lines 11 to 71 in e06d833
Remaining audit items
The v0.11 holistic review found these unresolved public-boundary questions:
DialCacheexposes duplicate scope-method pairs:enable/disableandwithEnabled/withDisabled. Documentation consistently teachesenable/disable.RedisConfigfromsrc/internal/redis-cache.ts. The contract may be intentional, but a public type should live behind a public module boundary rather than makinginternalpart of the source-level API architecture.redisClusterHashTag("")returns"{}"; Redis does not treat an empty brace pair as an effective cluster hash tag. The helper should either reject an empty value or cease to be a public supported helper.DialCacheKeyConfig.enabled(ttlSec)enables both local and remote layers at 100%. That shorthand can broaden behavior when Redis is later configured and is less explicit than the normal layer-map API. Decide whether to remove it, rename it to make both layers explicit, or retain it with a strong contract before v1.DialCacheKeyis the input toCacheConfigProvider—while others still need an explicit supported-consumer justification.The new cached-definition snapshot, runtime key validation, and CommonJS error-identity findings are tracked separately because they are correctness/package-runtime work rather than export-inventory decisions:
Recommended simplicity-first direction — decision required
Subject to explicit approval before any public removal or rename:
enable/disablecanonical and consider removingwithEnabled/withDisabledbefore v1 with a concise migration note.RedisConfigdefinition out ofinternalwithout introducing another user-facing concept.enabled()shorthand unless real usage justifies it.Acceptance criteria
internalmodule after the cleanup.DialCacheKeyConfig.enabled()with an explicit migration path if it changes.