Update FileCache.cpp

This commit is contained in:
Kseniia Sumarokova 2024-01-24 17:28:01 +01:00 committed by GitHub
parent 0d7710ee4b
commit 235980d52e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -881,18 +881,12 @@ void FileCache::iterate(IterateFunc && func, const UserID & user_id)
void FileCache::removeKey(const Key & key, const UserID & user_id) void FileCache::removeKey(const Key & key, const UserID & user_id)
{ {
assertInitialized(); assertInitialized();
#ifdef ABORT_ON_LOGICAL_ERROR
assertCacheCorrectness();
#endif
metadata.removeKey(key, /* if_exists */false, /* if_releasable */true, user_id); metadata.removeKey(key, /* if_exists */false, /* if_releasable */true, user_id);
} }
void FileCache::removeKeyIfExists(const Key & key, const UserID & user_id) void FileCache::removeKeyIfExists(const Key & key, const UserID & user_id)
{ {
assertInitialized(); assertInitialized();
#ifdef ABORT_ON_LOGICAL_ERROR
assertCacheCorrectness();
#endif
metadata.removeKey(key, /* if_exists */true, /* if_releasable */true, user_id); metadata.removeKey(key, /* if_exists */true, /* if_releasable */true, user_id);
} }