-
Notifications
You must be signed in to change notification settings - Fork 145
Cache
SinisterRectus edited this page Mar 4, 2017
·
17 revisions
Name | Type | Mutable | Description |
---|---|---|---|
count | number | How many objects are cached |
Prototype | Interface | Description |
---|---|---|
add(obj) | Local | Adds an object to the cache. Must match the defined type. |
columns([keys[, ...]]) | Local | Returns a table of object keys in column-format, sorted by first key. |
find(predicate) | Local | Returns the first object found that satisfies a predicate. |
findAll(predicate) | Local | Returns an iterator for all objects that satisfy a predicate. |
get([key,] value) | Local | Returns the first object that matches provided (key, value) pair. |
getAll([key, value]) | Local | Returns an iterator for all objects that match the (key, value) pair. |
has(obj) | Local | Returns a boolean indicating whether the cache contains the specified object. |
iter() | Local | Returns an iterator for the objects in the queue. Order is not guaranteed. |
merge(array) | Local | Adds many new Discord object from an array of data tables. |
new(data) | Local | Adds a new Discord object from a data table and returns the object. |
remove(obj) | Local | Remove an object from the cache. Must match the defined type. |
rows([keys[, ...]]) | Local | Returns a table of object keys in row-format, sorted by first key. |