util/memcache.lua

changeset 16
906615e293de
parent 15
87ef478bf7fc
child 17
5bede08f2f55
--- a/util/memcache.lua	Sun Aug 01 12:20:27 2010 +0100
+++ b/util/memcache.lua	Sun Aug 01 12:23:34 2010 +0100
@@ -24,6 +24,10 @@
 		return true;
 	end
 	
+	function cache:exists(key)
+		return not not _data[key];
+	end
+	
 	function cache:get(key)
 		local expires = _expiry[key];
 		if expires and expires < now() then

mercurial