Documentation
    Preparing search index...

    Class RedisCache

    Class RedisCache. Implements cache engine over redis.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    name: string = RedisCache.name
    ready: boolean = false

    Methods

    • Removes stored in cache value under given key

      Parameters

      • key: string

      Returns Promise<boolean>

    • Returns value stored in cache by a given key

      Parameters

      • key: string

      Returns Promise<any>

    • Purges all keys from cache by a given wildcard mask

      Parameters

      • keyMask: string

      Returns Promise<boolean>

    • Stores in cache given value under given key. If TTL is specified, cached value will expire in a given number of milliseconds. If NX argument set to true will create key:value in cache only if it does not exist yet. Given value could be any JSON-compatible object and will be serialized automatically.

      Parameters

      • key: string
      • value: any
      • Optionalttl: number
      • nx: boolean = false

      Returns Promise<boolean>