about summary refs log tree commit diff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-02-18T15·11+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-02-18T15·11+0000
commit885e22b16e3a6ea2a94014d33de31d756fa32eda (patch)
tree40a48e97e861c5d4e7ec7577de1e75420fcb3f02 /src/libstore/local-store.hh
parentcfb09e0fadf7db240f4f8c35c35c13b192456b89 (diff)
* Implement isValidPath().
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 3637a5d07c..fe4ed035de 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -63,6 +63,7 @@ struct SQLiteStmt
     sqlite3_stmt * stmt;
     SQLiteStmt() { stmt = 0; }
     void create(sqlite3 * db, const string & s);
+    void reset();
     ~SQLiteStmt();
     operator sqlite3_stmt * () { return stmt; }
 };
@@ -178,13 +179,6 @@ private:
     /* Lock file used for upgrading. */
     AutoCloseFD globalLock;
 
-    /* !!! The cache can grow very big.  Maybe it should be pruned
-       every once in a while. */
-    std::map<Path, ValidPathInfo> pathInfoCache;
-
-    /* Store paths for which the referrers file must be purged. */
-    PathSet delayedUpdates;
-
     /* Whether to do an fsync() after writing Nix metadata. */
     bool doFsync;
 
@@ -194,6 +188,7 @@ private:
     /* Some precompiled SQLite statements. */
     SQLiteStmt stmtRegisterValidPath;
     SQLiteStmt stmtAddReference;
+    SQLiteStmt stmtIsValidPath;
 
     int getSchema();
 
@@ -209,13 +204,13 @@ private:
     
     void rewriteReferrers(const Path & path, bool purge, PathSet referrers);
 
-    void flushDelayedUpdates();
-    
     bool queryReferrersInternal(const Path & path, PathSet & referrers);
     
     void invalidatePath(const Path & path);
-    
+
     void upgradeStore6();
+    PathSet queryValidPathsOld();
+    ValidPathInfo queryPathInfoOld(const Path & path);
 
     struct GCState;