Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InvalidAccessTokensMemCache<CacheArgsBundle>

Memory cache which holds invalidated access tokens.
Uses lib.cache under the hood.

Type parameters

  • CacheArgsBundle: AbsoluteExpirationPolicyArgumentsBundle

Hierarchy

  • InvalidAccessTokensMemCache

Implements

  • InvalidAccessTokensCache

Constructors

Methods

Constructors

constructor

  • new InvalidAccessTokensMemCache<CacheArgsBundle>(cache?: Cache<string, Nullable<number>, CacheArgsBundle, "plain", Nullable<number>>): InvalidAccessTokensMemCache<CacheArgsBundle>
  • Type parameters

    • CacheArgsBundle: AbsoluteExpirationPolicyArgumentsBundle

    Parameters

    • Optional cache: Cache<string, Nullable<number>, CacheArgsBundle, "plain", Nullable<number>>

      Cache instance.
      Defaults to a new {@link PolicyBasedCache} instance created with {@link EntryPoolCacheBackend} and {@link ProactiveExpirationPolicy} with {@link HeapGarbageCollector}.

    Returns InvalidAccessTokensMemCache<CacheArgsBundle>

Methods

clear

  • clear(): void
  • Returns void

get

  • get(accessToken: string): undefined | Nullable<number>
  • Parameters

    • accessToken: string

    Returns undefined | Nullable<number>

has

  • has(accessToken: string): boolean
  • Parameters

    • accessToken: string

    Returns boolean

upset

  • upset(accessToken: string, invalidatedAt: null | number, ttl: number): void
  • Parameters

    • accessToken: string
    • invalidatedAt: null | number
    • ttl: number

    Returns void