From 45de0163ba5861be310170f28ae26bba1beea710 Mon Sep 17 00:00:00 2001 From: msm Date: Thu, 17 Oct 2024 16:44:55 +0200 Subject: [PATCH] Reformat, clean up --- libursa/OnDiskDataset.cpp | 3 +-- libursa/Query.cpp | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libursa/OnDiskDataset.cpp b/libursa/OnDiskDataset.cpp index 2075062..453f1c6 100644 --- a/libursa/OnDiskDataset.cpp +++ b/libursa/OnDiskDataset.cpp @@ -91,8 +91,7 @@ QueryResult OnDiskDataset::query(const Query &query, } } }, - &string_cache, - counters); + &string_cache, counters); } void OnDiskDataset::execute(const Query &query, ResultWriter *out, diff --git a/libursa/Query.cpp b/libursa/Query.cpp index 56e36de..d1e902e 100644 --- a/libursa/Query.cpp +++ b/libursa/Query.cpp @@ -248,7 +248,6 @@ QueryResult Query::run(const QueryPrimitive &primitive, auto cache_key = get_cache_key(); auto cached_it = cache->find(cache_key); if (cached_it != cache->end()) { - spdlog::info("found a cached string {}!", cached_it->second.size()); return QueryResult(cached_it->second.clone()); } auto result = QueryResult::everything(); @@ -262,7 +261,6 @@ QueryResult Query::run(const QueryPrimitive &primitive, } } if (!cache_key.empty() && !result.is_everything()) { - spdlog::debug("caching (len: {})...", cache_key.size()); cache->emplace(std::move(cache_key), result.vector().clone()); } return result; @@ -292,7 +290,8 @@ QueryResult Query::run(const QueryPrimitive &primitive, int cutoff = count; int nonempty_sources = queries.size(); for (const auto &query : queries) { - QueryResult next = query.run(primitive, prefetcher, cache, counters); + QueryResult next = + query.run(primitive, prefetcher, cache, counters); if (next.is_everything()) { cutoff -= 1; if (cutoff <= 0) {