Showing the changes to libraries/script-engine/src/ScriptCache.cpp (1 of 7 files). Show all
Unified · Split
| @@ -27,6 +27,11 @@ ScriptCache::ScriptCache(QObject* parent) { · 26 unmodified lines | ||
| 27 | 27 | // nothing to do here... |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | +void ScriptCache::clearCache() { | |
| 31 | + _scriptCache.clear(); | |
| 32 | +} | |
| 33 | + | |
| 34 | + | |
| 30 | 35 | QString ScriptCache::getScript(const QUrl& unnormalizedURL, ScriptUser* scriptUser, bool& isPending, bool reload) { |
| 31 | 36 | QUrl url = ResourceManager::normalizeURL(unnormalizedURL); |
| 32 | 37 | QString scriptContents; |
| @@ -95,6 +100,8 @@ void ScriptCache::getScriptContents(const QString& scriptOrURL, contentAvailable · 62 unmodified lines | ||
| 95 | 100 | return; |
| 96 | 101 | } |
| 97 | 102 | |
| 103 | + qCDebug(scriptengine) << "ScriptCache::getScriptContents() scriptOrURL:" << scriptOrURL << " forceDownload:" << forceDownload << " on thread[" << QThread::currentThread() << "] expected thread[" << thread() << "]"; | |
| 104 | + | |
| 98 | 105 | if (_scriptCache.contains(url) && !forceDownload) { |
| 99 | 106 | qCDebug(scriptengine) << "Found script in cache:" << url.toString(); |
| 100 | 107 | #if 1 // def THREAD_DEBUGGING |