API: function enable_caching() is now cache()

This commit is contained in:
Adrian C. (anrxc) 2010-03-07 00:56:42 +01:00
parent 9371839401
commit 5226d10c27
2 changed files with 3 additions and 3 deletions

4
README
View File

@ -78,7 +78,7 @@ Restart suspended widgets:
- if widget is provided only that widget will be activated
Enable caching for a widget:
vicious.enable_caching(widget_type)
vicious.cache(widget_type)
- enable caching of values returned by a widget type
@ -335,7 +335,7 @@ Date widget
Memory widget
memwidget = widget({ type = 'textbox' })
vicious.enable_caching(vicious.widgets.mem)
vicious.cache(vicious.widgets.mem)
vicious.register(memwidget, vicious.widgets.mem, '$1 ($2MB/$3MB)', 13)
- updated every 13 seconds, appends "MB" to 2nd and 3rd returned

View File

@ -207,7 +207,7 @@ end
-- }}}
-- {{{ Enable caching for a widget
function enable_caching(widget)
function cache(widget)
if widget_cache[widget] == nil then
widget_cache[widget] = {}
end