diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-09-25 21:16:55 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-09-25 21:32:58 +0200 |
commit | 549d27f398c09777ec431b76deeecf23650b8eb6 (patch) | |
tree | 52c71d85dfea3d0a9b00716533f3020fa88e1d63 | |
parent | 16778bfbba59d5945dfa0cf2bbf8d263816f1d6c (diff) | |
download | vicious-legacy-549d27f398c09777ec431b76deeecf23650b8eb6.tar.xz |
Caching is controlled by users
-rw-r--r-- | init.lua | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -77,8 +77,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 @@ -213,6 +211,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 |