holdon
A simple, non atomic, unique key/values based cache
Specially handy in all those situations where one unique id can perform an asynchronous action you don't want to drop the first time is called but you want to store all listeners waiting for such result.
Simplified API for common cases
module { // true only if created first time if cache fs; }; { callback;}
Full API example
// module: filereadervar fs = ; // a generic module cache// with a callback propertyvar cache = ; { callback;} module { if !cache fs; // add the path to the queue cache;};
In another file ...
var filereader = ; // whenever is needed; ; ; // it does not matter how many asking, the disk will read it once