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).
Readonly
isReadonly flag to indicate that his object implements MemoryUsage.
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.
Stores an entry in the cache, or replaces an existing entry with the same key.
The key.
The value.
The options.
The cache.