Delete a key-value pair 

If a key-value pair is no longer needed, it can be permanently deleted from the cache segment. The key-value pair cannot be restored once it is deleted, but it can be recreated.  The segment reference used in the code snippet below is a segment instance.

Delete using a key 

You can delete a key by passing it directly as a parameter to the delete() method.

The promise returned here will be resolved to an object which is a JSON.

Copied//delete Cache using delete by passing the key name
    let cache = app.cache();
    let segment = cache.segment();
    let deletePromise = segment.delete('Name');
    deletePromise.then((entity) => {
            console.log(entity);
        });