aboutsummaryrefslogtreecommitdiff
path: root/src/cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cache.cpp')
-rw-r--r--src/cache.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cache.cpp b/src/cache.cpp
index 0fcade75..a432c27d 100644
--- a/src/cache.cpp
+++ b/src/cache.cpp
@@ -282,6 +282,11 @@ Cache::~Cache()
close_database();
}
+std::unique_ptr<Cache> Cache::in_memory(ConfigContainer& c)
+{
+ return std::make_unique<Cache>(Filepath::from_locale_string(":memory:"), c);
+}
+
void Cache::set_pragmas()
{
std::lock_guard<std::recursive_mutex> lock(mtx);