aboutsummaryrefslogtreecommitdiffstats
path: root/util/cache.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-04-15 13:39:56 +0200
committerKim Alvefur <zash@zash.se>2016-04-15 13:39:56 +0200
commit145dcbd56116dc8f04be31f0227739f98679d9d3 (patch)
treeb69d14abe9f602425aa02b59e944a346aea31eee /util/cache.lua
parent45e055d26a8133358518ba4f2c6676a15b2b1c75 (diff)
parent8c8867a14eed3e8136fa2dfe9567e92ec3c47e3b (diff)
downloadprosody-145dcbd56116dc8f04be31f0227739f98679d9d3.tar.gz
prosody-145dcbd56116dc8f04be31f0227739f98679d9d3.zip
Merge 0.10->trunk
Diffstat (limited to 'util/cache.lua')
-rw-r--r--util/cache.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/cache.lua b/util/cache.lua
index 074916cd..54f3e10b 100644
--- a/util/cache.lua
+++ b/util/cache.lua
@@ -88,6 +88,18 @@ function cache_methods:items()
end
end
+function cache_methods:values()
+ local m = self._head;
+ return function ()
+ if not m then
+ return;
+ end
+ local v = m.value;
+ m = m.next;
+ return v;
+ end
+end
+
function cache_methods:count()
return self._count;
end