Module: gears.cache

Info:

  • Copyright: 2015 Uli Schlachter
  • Author: Uli Schlachter

Constructors

gears.cache (creation_cb) Create a new cache object.

Methods

:get (...) Get an entry from the cache, creating it if it’s missing.


Constructors

gears.cache (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.

Parameters:

  • creation_cb Callback that is used for creating missing cache entries.

Returns:

    A new cache object.

Methods

:get (...)
Get an entry from the cache, creating it if it’s missing.

Parameters:

  • ... Arguments for the creation callback. These are checked against the cache contents for equality.

Returns:

    The entry from the cache
generated by LDoc 1.4.6 Last updated 2030-01-01 00:00:00