ContainerKache
An interface for a container cache. A container cache is a cache that stores a value for each key in a container i.e. a file. It is used to cache files that are too large to be stored in memory. Storing an object in a container cache requires serialization and deserialization logic that is handled by the user.
Properties
Functions
Returns the container for key if it exists in the cache or waits for its creation if it is currently in progress. This returns null if a file is not cached and isn't in creation or cannot be created. It may even throw exceptions for unhandled exceptions in the currently in-progress creation block.
Returns a KacheKeys instance that represents the keys that are currently in the cache, along with those that are under creation.
Returns the container for key if it already exists in the cache or null if it doesn't exist or creation is still in progress.
Returns the container for key if it exists in the cache, its creation is in progress or can be created by creationFunction. This returns null if a container is not cached and cannot be created. You can imply that the creation has failed by returning false. Any unhandled exceptions inside creationFunction won't be handled.
Returns a set of the keys that are currently under creation.
Creates a new container for key using creationFunction and returns the new value. Any existing container or in-progress creation of key would be replaced by the new function. This returns null if the container cannot be created. You can imply that the creation has failed by returning false. Any unhandled exceptions inside creationFunction won't be handled.
Creates a new container for key using creationFunction and returns a Deferred. Any existing container or in-progress creation of key would be replaced by the new function. You can imply that the creation has failed by returning null.
Cancels all in-progress creations.
Remove entries according to the policy defined by strategy until the total of remaining entries is/at/or below size. It won't affect the max size of the cache, allowing it to grow again.