enonic / lib-cache

Cache Library for Enonic XP.
Apache License 2.0
2 stars 1 forks source link

Implement remove-function in cache.js #1

Closed aro closed 7 years ago

aro commented 7 years ago

Implement remove-function in cache.js. This should remove one single entry in the cache:

cache.remove('key');

Also implement a regexp alternative that implements multiple keys.

cache.removePattern('a.+');

The implementation of the last one should do the following:

  1. Get all keys
  2. Filter the keys with regexp
  3. Use cache.invalidate(keys)