MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / checkCacheProviderInProd

Function checkCacheProviderInProd

apps/api/src/config/env/validate.ts:727–737  ·  view source on GitHub ↗
(env: Env)

Source from the content-addressed store, hash-verified

725 * a logout on one instance would leave the token valid on every other.
726 */
727const checkCacheProviderInProd = (env: Env): string[] => {
728 if (env.NODE_ENV !== "production" || !env.CACHE_ENABLED) {
729 return [];
730 }
731
732 return env.CACHE_PROVIDER === "valkey"
733 ? []
734 : [
735 "CACHE_PROVIDER must be valkey in production when CACHE_ENABLED=true so JWT revocation state survives restarts and is shared across replicas",
736 ];
737};
738
739const checkValkeyPassword = (env: Env): string[] => {
740 if (env.NODE_ENV !== "production" || env.VALKEY_PASSWORD !== "") {

Callers 1

checkInvariantsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected