Creates a new instance of this cache.
Closes component and frees used resources.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Configures component by passing configuration parameters.
configuration parameters to be set.
Checks if the component is opened.
true if the component has been opened and false otherwise.
Opens the component.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Removes a value from the cache by its key.
(optional) transaction id to trace execution through call chain.
a unique value key.
(optional) callback function that receives an error or null for success
Retrieves cached value from the cache using its key. If value is missing in the cache or expired it returns null.
(optional) transaction id to trace execution through call chain.
a unique value key.
callback function that receives cached value or error.
Sets references to dependent components.
references to locate the component dependencies.
Stores value in the cache with expiration time.
(optional) transaction id to trace execution through call chain.
a unique value key.
a value to store.
expiration timeout in milliseconds.
(optional) callback function that receives an error or null for success
Generated using TypeDoc
Distributed cache that stores values in Memcaches caching service.
The current implementation does not support authentication.
Configuration parameters
References
*:discovery:*:*:1.0
(optional) IDiscovery services to resolve connectionExample
let cache = new MemcachedCache(); cache.configure(ConfigParams.fromTuples( "host", "localhost", "port", 11211 )); cache.open("123", (err) => { ... }); cache.store("123", "key1", "ABC", (err) => { cache.store("123", "key1", (err, value) => { // Result: "ABC" }); });