Caching is controlled by users
This commit is contained in:
parent
09457245e9
commit
eadf0c93e1
10
init.lua
10
init.lua
|
@ -74,8 +74,6 @@ for w, i in pairs(_M) do
|
||||||
if w ~= "widgets" and w ~= "helpers" then
|
if w ~= "widgets" and w ~= "helpers" then
|
||||||
-- Place widgets in the namespace table
|
-- Place widgets in the namespace table
|
||||||
widgets[w] = i
|
widgets[w] = i
|
||||||
-- Enable caching for all widget types
|
|
||||||
widget_cache[i] = {}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -215,6 +213,14 @@ function activate(widget)
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Enable caching for a widget
|
||||||
|
function enable_caching(widget)
|
||||||
|
if widget_cache[widget] == nil then
|
||||||
|
widget_cache[widget] = {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Update a widget
|
-- {{{ Update a widget
|
||||||
function update(widget, reg, disablecache)
|
function update(widget, reg, disablecache)
|
||||||
-- Check if there are any equal widgets
|
-- Check if there are any equal widgets
|
||||||
|
|
Loading…
Reference in New Issue