缓存类

Hierarchy

  • default

Constructors

Properties

Methods

Constructors

Properties

dataBase: { [key: string]: any } = {}

Type declaration

  • [key: string]: any

Methods

  • 清空缓存

    Returns void

  • 从缓存中获取值

    Parameters

    • key: string

      缓存唯一标识

    • Optional defaultValue: (() => any)

      当缓存不存在的时候创建该值的方法

        • (): any
        • Returns any

    Returns any

  • 设置缓存值

    Parameters

    • key: string

      缓存唯一标识

    • value: any

    Returns any

  • 移除缓存

    Parameters

    • key: string

      缓存唯一标识

    Returns void