add CompactStore interface

This commit is contained in:
siddontang 2015-05-03 11:24:03 +08:00
parent 9bfd3b2208
commit 9f5d7f4a0f
1 changed files with 7 additions and 0 deletions

View File

@ -230,3 +230,10 @@ func (l *Ledis) checkTTL() {
func (l *Ledis) StoreStat() *store.Stat {
return l.ldb.Stat()
}
func (l *Ledis) CompactStore() error {
l.wLock.Lock()
defer l.wLock.Unlock()
return l.ldb.Compact()
}