Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CacheManager

Cache manager is a module which controls all caches downloaded from server in non-web platform, it is a singleton All member can be accessed with cc.assetManager.cacheManager.

Hierarchy

  • CacheManager

Index

Properties

Abstract autoClear

autoClear: boolean

Whether or not auto clear cache when storage ran out, this property only works on mini-game platforms

Abstract cacheDir

cacheDir: string

The name of cacheDir

Abstract cacheEnabled

cacheEnabled: boolean

Whether or not cache asset into user's storage space, this property only works on mini-game platforms

Abstract cacheInterval

cacheInterval: number

The interval between caching resources, this property only works on mini-game platforms, unit: ms

Abstract cachedFiles

cachedFiles: Cache<{ bundle: string; lastTime: number; url: string }>

List of all cached files

Abstract deleteInterval

deleteInterval: number

The interval between deleting resources, when you use cleanLRU, the resources will be deleted as this interval, unit: ms

Methods

Abstract clearCache

  • clearCache(): void

Abstract clearLRU

  • clearLRU(): void

Abstract getCache

  • getCache(originUrl: string): string

Abstract getTemp

  • getTemp(originUrl: string): string

Abstract removeCache

  • removeCache(originUrl: string): void

Generated using TypeDoc