Class gears.cache
Info:
- Copyright: 2015 Uli Schlachter
- Author: Uli Schlachter
Functions
cache:get (...) | Get an entry from the cache, creating it if it's missing. |
cache.new (creation_cb) | Create a new cache object. |
Functions
- cache:get (...)
-
Get an entry from the cache, creating it if it's missing.
- ... Arguments for the creation callback. These are checked against the cache contents for equality.
Returns:
-
The entry from the cache
- cache.new (creation_cb)
-
Create a new cache object. A cache keeps some data that can be
garbage-collected at any time, but might be useful to keep.
- creation_cb Callback that is used for creating missing cache entries.
Returns:
-
A new cache object.