summary refs log tree commit diff
path: root/src/Cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cache.cc')
-rw-r--r--src/Cache.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Cache.cc b/src/Cache.cc

index bda81316..5ed77086 100644 --- a/src/Cache.cc +++ b/src/Cache.cc
@@ -153,6 +153,16 @@ Cache::insertRoomState(lmdb::txn &txn, const QString &roomid, const RoomState &s } } +void +Cache::removeRoom(const QString &roomid) +{ + auto txn = lmdb::txn::begin(env_, nullptr, 0); + + lmdb::dbi_del(txn, roomDb_, lmdb::val(roomid.toUtf8(), roomid.toUtf8().size()), nullptr); + + txn.commit(); +} + QMap<QString, RoomState> Cache::states() {