aboutsummaryrefslogtreecommitdiff
path: root/src/cachestorenids.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cachestorenids.h')
-rw-r--r--src/cachestorenids.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cachestorenids.h b/src/cachestorenids.h
index 62d1555..bd0fcc7 100644
--- a/src/cachestorenids.h
+++ b/src/cachestorenids.h
@@ -7,6 +7,10 @@
7#include "bu/nidsstream.h" 7#include "bu/nidsstream.h"
8#include "bu/cachestore.h" 8#include "bu/cachestore.h"
9 9
10#include "bu/file.h"
11
12static int iCnt = 0;
13
10namespace Bu 14namespace Bu
11{ 15{
12 template<class obtype, class keytype> 16 template<class obtype, class keytype>
@@ -44,6 +48,12 @@ namespace Bu
44 NidsStream ns = nStore.openStream( 0 ); 48 NidsStream ns = nStore.openStream( 0 );
45 Bu::Archive ar( ns, Bu::Archive::save ); 49 Bu::Archive ar( ns, Bu::Archive::save );
46 ar << hId; 50 ar << hId;
51
52 Bu::FString sName;
53 sName.format("hash-%d.%02d", time( NULL ), iCnt++ );
54 Bu::File sTmp( sName, Bu::File::Write|Bu::File::Create );
55 Bu::Archive artmp( sTmp, Bu::Archive::save );
56 artmp << hId;
47 } 57 }
48 58
49 virtual obtype *load( const keytype &key ) 59 virtual obtype *load( const keytype &key )