Entity
    interface GenericRedisCacheContext {
        cacheKeyPrefix: string;
        invalidationStrategy: RedisCacheInvalidationStrategy;
        makeKeyFn: (...parts: string[]) => string;
        redisClient: IRedis;
        ttlSecondsNegative: number;
        ttlSecondsPositive: number;
    }
    Index

    Properties

    cacheKeyPrefix: string

    Prefix prepended to all entity cache keys. Useful for adding a short, human-readable distintion for entity keys, e.g. ent-

    invalidationStrategy: RedisCacheInvalidationStrategy

    Invalidation strategy for the cache.

    makeKeyFn: (...parts: string[]) => string

    Create a key string for key parts (cache key prefix, versions, entity name, etc). Most commonly a simple parts.join(':'). See integration test for example.

    redisClient: IRedis

    Instance of ioredis.Redis

    ttlSecondsNegative: number

    TTL for negatively caching database misses. Successive entity loads within this TTL will be assumed not present in the database (unless invalidated).

    ttlSecondsPositive: number

    TTL for caching database hits. Successive entity loads within this TTL will be read from cache (unless invalidated).

    MMNEPVFCICPMFPCPTTAAATR