From beebcfc38d5837d8c69a3a8785778379ea3c54f4 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Fri, 23 Oct 2020 02:51:18 +0200 Subject: [PATCH] Going full CachedDatabase. --- src/server/storage.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/storage.cr b/src/server/storage.cr index 127dd96..1fb4827 100644 --- a/src/server/storage.cr +++ b/src/server/storage.cr @@ -26,7 +26,7 @@ end # but in environment without HTTP integration, this could still be relevant. class FileStorage::Storage - property db : DODB::DataBase(TransferInfo) + property db : DODB::CachedDataBase(TransferInfo) # Search file informations by their index, owner and tags. property db_by_filedigest : DODB::Index(TransferInfo) @@ -46,7 +46,7 @@ class FileStorage::Storage # - users/ : DODB UserData (for later use: quotas, rights) def initialize(@root, reindex : Bool = false) - @db = DODB::DataBase(TransferInfo).new "#{@root}/meta" + @db = DODB::CachedDataBase(TransferInfo).new "#{@root}/meta" # Where to store uploaded files. FileUtils.mkdir_p "#{@root}/files"