OptionalcategoryExpiry per category, overriding defaultTTLSeconds (0 = no expiry). Merged over
the built-in { default: 0 } rather than replacing it, so setting one category never
changes another; name default here to override even that.
The default category holds proxy keys: entries that vouch for other entries. The
metadata snapshot's timestamps key is written after the payload it describes, and a dataset's
_date key after its blob — so under one blanket TTL the proxy outlives what it vouches for,
and a reader finds a freshness claim with nothing behind it. A server booting into that
window adopted the timestamps and served empty metadata as current; the dataset check threw.
OptionaldefaultPublish mode for categories not named in publishModes.
OptionaldefaultDefault time-to-live in seconds applied to every SetItem call
unless the call passes its own TTL.
Event-driven invalidation stays the primary freshness mechanism; the TTL bounds how long
an entry written by a process that never publishes (a direct SQL change, another
application) can be served, and gives a volatile-* eviction policy something to evict —
Redis never evicts a key without an expiry under those policies.
Set to 0 to store keys without expiration (persistent).
OptionalenableWhether to log connection events (connect, disconnect, error) via
MemberJunction's LogStatus / LogError functions.
OptionalenableWhether to enable Redis pub/sub for cross-server cache invalidation. When enabled, the provider will:
SetItem, Remove, and ClearCategory callLocalCacheManager) can dispatch to registered callbacksPub/sub is not started automatically — call RedisLocalStorageProvider.StartListening after construction to begin subscribing.
OptionalkeyOptional prefix prepended to all Redis keys. Useful for isolating MemberJunction data in a shared Redis instance.
Keys are stored as {keyPrefix}:{category}:{key}.
OptionalmaxCaps reconnection attempts. Past the cap ioredis stops reconnecting for the life of the client, leaving the process cache-blind until it restarts.
Omit it on a long-running process. Set it only for a short-lived script that should fail rather than wait out an outage.
undefined — retry indefinitely, with each wait capped by maxRetryDelayMs
OptionalmaxCeiling on the wait between reconnection attempts, in milliseconds. The backoff doubles from 200ms up to this value and then holds there, so a long outage costs one attempt per ceiling.
OptionaloptionsFull ioredis options object for fine-grained connection control.
Mutually exclusive with url.
OptionalpublishWhat a set or removed publishes, per category (the category default covers writes
without one). category_cleared is always published in full.
'full' — the event carries the stored value in Data, so a subscriber can apply it
without reading Redis. Right for categories whose values subscribers adopt (the RunView
cache: engines apply the rows).'notice' — the event names the key but carries no value. Right for large values that
subscribers only need to know changed (the metadata snapshot: a server that hears about it
re-checks its metadata against the database).'none' — nothing is published.Categories not listed use defaultPublishMode.
OptionalurlRedis connection URL (e.g., redis://localhost:6379, rediss://user:pass@host:6380).
Mutually exclusive with options.
The rediss:// scheme enables TLS, which is required for most cloud-hosted Redis services.
Configuration options for the Redis local storage provider.
Accepts either a Redis connection URL string or an
ioredisoptions object, plus optional MemberJunction-specific settings.Example