diff options
Diffstat (limited to '')
-rw-r--r-- | src/unstable/myriadcache.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unstable/myriadcache.h b/src/unstable/myriadcache.h index f71f9b5..289ab05 100644 --- a/src/unstable/myriadcache.h +++ b/src/unstable/myriadcache.h | |||
@@ -108,13 +108,13 @@ namespace Bu | |||
108 | const keytype &k | 108 | const keytype &k |
109 | ) | 109 | ) |
110 | { | 110 | { |
111 | Bu::MyriadStream ms = mStore.openStream( hIndex.get( k ) ); | 111 | Bu::MyriadStream ms = mStore.open( hIndex.get( k ), Bu::Myriad::Read ); |
112 | return _cacheObjectLoad<keytype, obtype>( initObj, k, ms ); | 112 | return _cacheObjectLoad<keytype, obtype>( initObj, k, ms ); |
113 | } | 113 | } |
114 | 114 | ||
115 | virtual void _save( const obtype *o ) | 115 | virtual void _save( const obtype *o ) |
116 | { | 116 | { |
117 | Bu::MyriadStream ms = mStore.openStream( hIndex.get( o->getKey() ) ); | 117 | Bu::MyriadStream ms = mStore.open( hIndex.get( o->getKey() ), Bu::Myriad::WriteNew ); |
118 | _cacheObjectSave( ms, o ); | 118 | _cacheObjectSave( ms, o ); |
119 | ms.setSize( ms.tell() ); | 119 | ms.setSize( ms.tell() ); |
120 | 120 | ||
@@ -127,7 +127,7 @@ namespace Bu | |||
127 | if( !bStructureChanged ) | 127 | if( !bStructureChanged ) |
128 | return; | 128 | return; |
129 | 129 | ||
130 | Bu::MyriadStream ms = mStore.openStream( 1 ); | 130 | Bu::MyriadStream ms = mStore.open( 1, Bu::Myriad::WriteNew ); |
131 | Bu::Archive ar( ms, Bu::Archive::save ); | 131 | Bu::Archive ar( ms, Bu::Archive::save ); |
132 | ar << (uint8_t)0 << hIndex; | 132 | ar << (uint8_t)0 << hIndex; |
133 | ar.close(); | 133 | ar.close(); |