util/cache.lua
changeset 7357 8ca7f1c2c660
parent 7293 70ab13e81cf5
child 7438 8603b16e85c7
--- a/util/cache.lua	Wed Apr 13 20:00:41 2016 +0200
+++ b/util/cache.lua	Fri Apr 15 13:19:20 2016 +0200
@@ -88,6 +88,18 @@
 	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