User:Jeblad/Lua cached data

From MediaWiki.org
Jump to navigation Jump to search

Lua cached data could be made by using a call in wikitext like {{#cached:module:function|data1dataN}} to construct a signature, and to store the returned structure in memcached. Only data cached before (?) a module is invoked (required) should be available, possibly also limited to explicit cached calls. The returned structure should be a read only structure, possibly as a limited table. This makes it possible to share expensive data between invocations across multiple pages.

It could be possible to use an ordinary module, and then prune the result. Later on the pruned result can be merged back. If raw tables are merged back, then protection can be stripped off, so must be referenced.

data = mw.buildData( 'Module:Data', 'builder', data )

All arguments must be convertible to string.

Frame traversal should not be available.

Globals should not be available.