towerstats.js
    Preparing search index...

    Class CacheManager

    Memory based cache management.

    Index

    Constructors

    Methods

    • Get an item from the cache.

      Type Parameters

      • T

      Parameters

      • namespace: string

        The namespace of which this item resides in.

      • key: string

        The key of this item.

      Returns null | T

      The value, if present.

    • Check if an item is currently present in a namespace or not.

      Parameters

      • namespace: string

        The namespace to check in.

      • key: string

        The key of the item to look for.

      Returns boolean

      Boolean indicating whether the namespace has the requested item or not.

    • Set an item's value in the cache.

      Parameters

      • namespace: string

        The namespace of which this item resides in.

      • key: string

        The key of this item.

      • value: any

        The new value for this item.

      Returns void

    • Start this cache manager's sweeper.

      Returns void

    • Stop this cache manager's sweeper.

      Returns void