diff options
| -rw-r--r-- | src/unstable/myriadcache.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/unstable/myriadcache.h b/src/unstable/myriadcache.h index 7f83250..ce0f2fa 100644 --- a/src/unstable/myriadcache.h +++ b/src/unstable/myriadcache.h | |||
| @@ -103,11 +103,13 @@ namespace Bu | |||
| 103 | Bu::MyriadStream ms = mStore.openStream( hIndex.get( o->getKey() ) ); | 103 | Bu::MyriadStream ms = mStore.openStream( hIndex.get( o->getKey() ) ); |
| 104 | _cacheObjectSave( ms, o ); | 104 | _cacheObjectSave( ms, o ); |
| 105 | ms.setSize( ms.tell() ); | 105 | ms.setSize( ms.tell() ); |
| 106 | |||
| 107 | mStore.sync(); | ||
| 106 | } | 108 | } |
| 107 | 109 | ||
| 108 | virtual void _sync() | 110 | virtual void _sync() |
| 109 | { | 111 | { |
| 110 | Bu::ReadWriteMutex::ReadLocker wl( rwStore ); | 112 | Bu::ReadWriteMutex::WriteLocker wl( rwStore ); |
| 111 | if( !bStructureChanged ) | 113 | if( !bStructureChanged ) |
| 112 | return; | 114 | return; |
| 113 | 115 | ||
| @@ -118,6 +120,8 @@ namespace Bu | |||
| 118 | ms.setSize( ms.tell() ); | 120 | ms.setSize( ms.tell() ); |
| 119 | 121 | ||
| 120 | bStructureChanged = false; | 122 | bStructureChanged = false; |
| 123 | |||
| 124 | mStore.sync(); | ||
| 121 | } | 125 | } |
| 122 | 126 | ||
| 123 | private: | 127 | private: |
