Going full CachedDatabase.

dev
Karchnu 2020-10-23 02:51:18 +02:00
parent 2cd758317a
commit beebcfc38d
1 changed files with 2 additions and 2 deletions

View File

@ -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"