mirror of
https://github.com/flynx/guaranteeEvents.git
synced 2025-10-29 11:00:13 +00:00
minor doc rewrite...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
b068e0b49a
commit
01ca45aec3
12
README.md
12
README.md
@ -81,14 +81,14 @@ results.on('match', function(path){ console.log('found: '+path) })
|
|||||||
Cache cleaning and use for long running emitters
|
Cache cleaning and use for long running emitters
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
This is not recommended for use in long running event emitters as each
|
One of the dangers in using this in long running event emitters is _cache
|
||||||
event emitted data will get stored and might get quite large, i.e. a
|
buildup_ -- the data for each event emitted will get stored and this
|
||||||
potential source for a leak.
|
might get quite large, this, if not managed, is a potential memory leak.
|
||||||
|
|
||||||
To deal with this issue a `.clearGuaranteedQueue(<event>)` method is
|
To deal with this issue a `.clearGuaranteedQueue(<event>)` method is
|
||||||
added to the emitter, this will clear the cache for a specific event and
|
added to the emitter, this will clear the cache for a specific event.
|
||||||
a shorthand form `.clearGuaranteedQueue('*')` that will clear the cache
|
This and has a shorthand form `.clearGuaranteedQueue('*')` that will
|
||||||
for all wrapped events.
|
clear the cache for all wrapped events.
|
||||||
|
|
||||||
So for the above example:
|
So for the above example:
|
||||||
```javascript
|
```javascript
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user