summaryrefslogtreecommitdiff
path: root/src/cache.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-04-05 00:44:48 +0000
committerMike Buland <eichlan@xagasoft.com>2011-04-05 00:44:48 +0000
commit5fdf49f609a658161f482b406590531d4941ac46 (patch)
treeb4f0fb11174e3a34afbdb55f6c63927107331118 /src/cache.h
parentf837e7ef09bab37d2f896f381f5f956c824633c5 (diff)
downloadlibbu++-5fdf49f609a658161f482b406590531d4941ac46.tar.gz
libbu++-5fdf49f609a658161f482b406590531d4941ac46.tar.bz2
libbu++-5fdf49f609a658161f482b406590531d4941ac46.tar.xz
libbu++-5fdf49f609a658161f482b406590531d4941ac46.zip
Fixed the cache system missing a sync on header data for inserts and deletes.
Diffstat (limited to 'src/cache.h')
-rw-r--r--src/cache.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cache.h b/src/cache.h
index a2774ce..455cf1b 100644
--- a/src/cache.h
+++ b/src/cache.h
@@ -16,8 +16,6 @@
16 16
17#include "bu/trace.h" 17#include "bu/trace.h"
18 18
19#include "bu/sio.h"
20
21namespace Bu 19namespace Bu
22{ 20{
23// template<class keytype, class obtype> 21// template<class keytype, class obtype>
@@ -242,6 +240,8 @@ namespace Bu
242 240
243 pCalc->onLoad( pData, k ); 241 pCalc->onLoad( pData, k );
244 242
243 pStore->sync();
244
245 return Ptr( this, pData, k ); 245 return Ptr( this, pData, k );
246 } 246 }
247 247
@@ -331,6 +331,7 @@ namespace Bu
331 hEnt.erase( cId ); 331 hEnt.erase( cId );
332 332
333 pStore->destroy( pObj, cId ); 333 pStore->destroy( pObj, cId );
334 pStore->sync();
334 } 335 }
335 catch( Bu::HashException &e ) { 336 catch( Bu::HashException &e ) {
336 pCalc->onDestroy( cId ); 337 pCalc->onDestroy( cId );
@@ -343,6 +344,7 @@ namespace Bu
343 else 344 else
344 { 345 {
345 pStore->destroy( cId ); 346 pStore->destroy( cId );
347 pStore->sync();
346 } 348 }
347 } 349 }
348 } 350 }