aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cache.h5
-rw-r--r--src/cachestore.h1
-rw-r--r--src/cachestorenids.h5
3 files changed, 11 insertions, 0 deletions
diff --git a/src/cache.h b/src/cache.h
index c4e1b0b..0cb2fd2 100644
--- a/src/cache.h
+++ b/src/cache.h
@@ -295,6 +295,11 @@ namespace Bu
295 return pStore->getKeys(); 295 return pStore->getKeys();
296 } 296 }
297 297
298 int getSize()
299 {
300 return pStore->getSize();
301 }
302
298 /** 303 /**
299 * Make sure all currently loaded but not-in-use objects are synced to 304 * Make sure all currently loaded but not-in-use objects are synced to
300 * the store. 305 * the store.
diff --git a/src/cachestore.h b/src/cachestore.h
index 437b3d3..b75864b 100644
--- a/src/cachestore.h
+++ b/src/cachestore.h
@@ -29,6 +29,7 @@ namespace Bu
29 virtual void destroy( obtype *pObj, const keytype &key )=0; 29 virtual void destroy( obtype *pObj, const keytype &key )=0;
30 virtual bool has( const keytype &key )=0; 30 virtual bool has( const keytype &key )=0;
31 virtual Bu::List<keytype> getKeys() { return Bu::List<keytype>(); } 31 virtual Bu::List<keytype> getKeys() { return Bu::List<keytype>(); }
32 virtual int getSize() { return -1; }
32 33
33 private: 34 private:
34 }; 35 };
diff --git a/src/cachestorenids.h b/src/cachestorenids.h
index 0f7c72c..6a1c31b 100644
--- a/src/cachestorenids.h
+++ b/src/cachestorenids.h
@@ -131,6 +131,11 @@ namespace Bu
131 return hId.getKeys(); 131 return hId.getKeys();
132 } 132 }
133 133
134 virtual int getSize()
135 {
136 return hId.getSize();
137 }
138
134 private: 139 private:
135 Nids nStore; 140 Nids nStore;
136 typedef Bu::Hash<keytype, long> NidHash; 141 typedef Bu::Hash<keytype, long> NidHash;