Changeset

2655:f4353f959460

mod_storage_memory: Remove map store (rely on storagemanagers shiv)
author Kim Alvefur <zash@zash.se>
date Thu, 30 Mar 2017 23:38:40 +0200
parents 2654:9e5015555fff
children 2656:83fb61fa476e
files mod_storage_memory/mod_storage_memory.lua
diffstat 1 files changed, 0 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_memory/mod_storage_memory.lua	Thu Mar 30 23:33:45 2017 +0200
+++ b/mod_storage_memory/mod_storage_memory.lua	Thu Mar 30 23:38:40 2017 +0200
@@ -30,42 +30,6 @@
 
 keyval_store.purge = _purge_store;
 
-local map_store = {};
-map_store.__index = map_store;
-
-function map_store:get(username, key)
-	local userstore = self.store[username or NULL];
-	if type(userstore) == "table" then
-		return userstore[key];
-	end
-end
-
-function map_store:set(username, key, data)
-	local userstore = self.store[username or NULL];
-	if userstore == nil then
-		userstore = {};
-		self.store[username or NULL] = userstore;
-	end
-	userstore[key] = data;
-	return true;
-end
-
-map_store.remove = {};
-function map_store:set_keys(username, keydatas)
-	local userstore = self.store[username or NULL];
-	if userstore == nil then
-		userstore = {};
-		self.store[username or NULL] = userstore;
-	end
-	for k,v in pairs(keydatas) do
-		if v == self.remove then v = nil; end
-		userstore[k] = v;
-	end
-	return true;
-end
-
-map_store.purge = _purge_store;
-
 local archive_store = {};
 archive_store.__index = archive_store;
 
@@ -159,7 +123,6 @@
 
 local stores = {
 	keyval = keyval_store;
-	map = map_store;
 	archive = archive_store;
 }