Options
All
  • Public
  • Public/Protected
  • All
Menu

数据缓存相关

Hierarchy

  • Cache

Index

Constructors

constructor

Properties

Static memory

memory: object = {}

内存缓存配置对象

Methods

Static clearEnumCache

  • clearEnumCache(enumName: string): void
  • 清空枚举的缓存

    Parameters

    • enumName: string

      枚举名称

    Returns void

Static clearEnumCacheBySearch

  • clearEnumCacheBySearch(enumName: string): void
  • 清空枚举的缓存

    Parameters

    • enumName: string

      枚举名称

    Returns void

Static existEnumCache

  • existEnumCache(enumName: string, cacheKey: string): boolean
  • 判断是否存在枚举缓存

    Parameters

    • enumName: string

      枚举名称

    • cacheKey: string

      缓存的key

    Returns boolean

Static getCache

  • getCache(key: string): any
  • 获取保存在本地浏览器的缓存

    Parameters

    • key: string

      缓存的key

    Returns any

Static getEnumAllCache

  • getEnumAllCache(enumName: string): any
  • 获取枚举的所有缓存

    Parameters

    • enumName: string

      枚举名称

    Returns any

Static getEnumCache

  • getEnumCache(enumName: string, cacheKey: string): any
  • 获取枚举的缓存

    Parameters

    • enumName: string

      枚举名称

    • cacheKey: string

      缓存的key

    Returns any

Static removeCache

  • removeCache(key: string): any
  • 删除保存在本地浏览器的缓存

    Parameters

    • key: string

      缓存的key

    Returns any

Static setCache

  • setCache(key: string, data: any): void
  • 设置缓存,保存在本地浏览器,localStorage

    Parameters

    • key: string

      缓存的key

    • data: any

      缓存的数据

    Returns void

Static setEnumCache

  • setEnumCache(enumName: string, cacheKey: string, data: any): void
  • 设置枚举缓存

    Parameters

    • enumName: string

      枚举名称

    • cacheKey: string

      缓存的key

    • data: any

      缓存的数据

    Returns void