Constructs a cache.
The options.
Optional
byteThe capacity, in bytes, of the cache.
Optional
maxThe capacity, in number of entries, of the cache.
Optional
ttl?: numberThe default TTL (time to live) of entries. Can be overriden for each entry (see CacheOptions).
Gets the maximum number of entries.
Gets the number of entries.
Gets or sets the default TTL (time to live) of the cache.
Enables or disables the cache.
Gets the maximum size of the cache, in bytes.
Gets the size of entries, in bytes
Returns an approximation of the memory used by this object, in bytes.
The graphics context.
Optional
target: MemoryUsageReportIf specified, the values computed during this call must be added to the existing values in the target. Otherwise, a new report must be built.
The memory usage report. If target is specified, then this must be returned.
Stores an entry in the cache, or replaces an existing entry with the same key.
The key.
The value.
The options.
The cache.