about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/nar-info-disk-cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/nar-info-disk-cache.cc')
-rw-r--r--third_party/nix/src/libstore/nar-info-disk-cache.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/nar-info-disk-cache.cc b/third_party/nix/src/libstore/nar-info-disk-cache.cc
index c98882bff319..be2ad8f2dac1 100644
--- a/third_party/nix/src/libstore/nar-info-disk-cache.cc
+++ b/third_party/nix/src/libstore/nar-info-disk-cache.cc
@@ -49,7 +49,7 @@ create table if not exists LastPurge (
 
 )sql";
 
-class NarInfoDiskCacheImpl : public NarInfoDiskCache {
+class NarInfoDiskCacheImpl final : public NarInfoDiskCache {
  public:
   /* How often to purge expired entries from the cache. */
   const int purgeInterval = 24 * 3600;
@@ -280,8 +280,9 @@ class NarInfoDiskCacheImpl : public NarInfoDiskCache {
   }
 };
 
-ref<NarInfoDiskCache> getNarInfoDiskCache() {
-  static ref<NarInfoDiskCache> cache = make_ref<NarInfoDiskCacheImpl>();
+std::shared_ptr<NarInfoDiskCache> getNarInfoDiskCache() {
+  static std::shared_ptr<NarInfoDiskCache> cache =
+      std::make_shared<NarInfoDiskCacheImpl>();
   return cache;
 }