FlushCache writes (and thus clears) the write cache.
()
| 73 | |
| 74 | // FlushCache writes (and thus clears) the write cache. |
| 75 | func (i *Interface) FlushCache() { |
| 76 | // Check if write cache is in use. |
| 77 | if i.options.DelayCachedWrites != "" { |
| 78 | return |
| 79 | } |
| 80 | |
| 81 | i.flushWriteCache(0) |
| 82 | } |
| 83 | |
| 84 | func (i *Interface) flushWriteCache(percentThreshold int) { |
| 85 | i.writeCacheLock.Lock() |
no test coverage detected