Caching is controlled by users

This commit is contained in:
Adrian C. (anrxc) 2009-09-25 21:16:55 +02:00
parent 09457245e9
commit eadf0c93e1
1 changed files with 8 additions and 2 deletions

View File

@ -74,8 +74,6 @@ for w, i in pairs(_M) do
if w ~= "widgets" and w ~= "helpers" then
-- Place widgets in the namespace table
widgets[w] = i
-- Enable caching for all widget types
widget_cache[i] = {}
end
end
end
@ -215,6 +213,14 @@ function activate(widget)
end
-- }}}
-- {{{ Enable caching for a widget
function enable_caching(widget)
if widget_cache[widget] == nil then
widget_cache[widget] = {}
end
end
-- }}}
-- {{{ Update a widget
function update(widget, reg, disablecache)
-- Check if there are any equal widgets