Closed minispeck closed 8 years ago
would be nice if there was a .del method to delete a cached value by providing a key.
myCache.del(key);
love the simplicity of this library - but imo it needs a delete method.
currently we are using a workaround:
myCache.set(key, '', {'expire': 1});
not the most elegant. i would have expected that setting null or undefined would be equivalent to deleting but that doesnt seem to be the case.
Thanks to @fdegiuli there's a myCache.unset(key) starting with cached@4.3.0. In case you still need it. :)
myCache.unset(key)
cached@4.3.0
would be nice if there was a .del method to delete a cached value by providing a key.
myCache.del(key);
love the simplicity of this library - but imo it needs a delete method.
currently we are using a workaround:
myCache.set(key, '', {'expire': 1});
not the most elegant. i would have expected that setting null or undefined would be equivalent to deleting but that doesnt seem to be the case.