I so love the simplicity of the cacheLib-implementation in XP!
I don’t wanna mess with the simplicity, but could I ask your opinion on a teeny weeny addition to the cache clearing mechanism? The ability to invalidate a single key, or even keys that match a certain pattern?
// Clears the cache.
cache.clear();
// Can I have something like this?
cache.clear('myKey');
// Or even more powerful
cache.clear('myKey*');
// Not to mention
cache.clear(/myRegMatchingABunchOfKeys/);