Update InterpreterSystemQuery.cpp

This commit is contained in:
Kseniia Sumarokova 2023-07-01 13:16:51 +02:00 committed by GitHub
parent 0c03b160ea
commit 31a87c6527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -371,18 +371,7 @@ BlockIO InterpreterSystemQuery::execute()
else else
{ {
auto cache = FileCacheFactory::instance().getByName(query.filesystem_cache_name).cache; auto cache = FileCacheFactory::instance().getByName(query.filesystem_cache_name).cache;
if (query.delete_key.empty()) cache->removeAllReleasable();
{
cache->removeAllReleasable();
}
else
{
auto key = FileCacheKey::fromKeyString(query.delete_key);
if (query.delete_offset.has_value())
cache->removeFileSegment(key, query.delete_offset.value());
else
cache->removeKey(key);
}
} }
break; break;
} }