From 4e8bdd610b5899c83b75cebeeafcf82b6bec79f8 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 12 Mar 2024 14:24:06 +0100 Subject: Utils: Remove PresistentStoreCache It turns out caching the information is unreliable due to a variety of reasons. We remove the cache for now as its less dangerous than trying to fix each use case. Change-Id: I8238166486a2fb29c101f700af1c8d7e4ad7a172 Reviewed-by: hjk --- src/plugins/python/pythonutils.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/plugins/python/pythonutils.cpp') diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 2ecfe495bcd..0e0d66f6389 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -201,20 +200,10 @@ static bool isUsableHelper(QHash *cache, const QString &keyStrin auto it = cache->find(python); if (it == cache->end()) { const Key key = keyFromString(keyString); - const auto store = PersistentCacheStore::byKey(key); - if (store && store->value(keyFromString(python.toString())).toBool()) { - cache->insert(python, true); - return true; - } Process process; process.setCommand({python, QStringList{"-m", commandArg, "-h"}}); process.runBlocking(); const bool usable = process.result() == ProcessResult::FinishedWithSuccess; - if (usable) { - Store newStore = store.value_or(Store{}); - newStore.insert(keyFromString(python.toString()), true); - PersistentCacheStore::write(key, newStore); - } it = cache->insert(python, usable); } return *it; -- cgit v1.2.3