# HG changeset patch # User timkelly # Date 1282157890 18000 # Node ID 5b2d8f8c613b2123e4104863bec50bfa8d62f307 # Parent 5a696c4ef74791dd694a24dab619089473cdf482 add paramater to allow cache to be deleted or not when a refresh is done (you don't want to delete the cache on disk in the case of Symbian SDKs b/c if the IDE quits abnormally the cache in memory is not written to disk. diff -r 5a696c4ef747 -r 5b2d8f8c613b core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2QueryUtils.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2QueryUtils.java Tue Aug 17 15:50:47 2010 -0700 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2QueryUtils.java Wed Aug 18 13:58:10 2010 -0500 @@ -472,15 +472,15 @@ } public static void removeCachedAliases() { - SDKCacheUtils.getCache().removeCache(ALIAS_CACHE_KEY); + SDKCacheUtils.getCache().removeCache(ALIAS_CACHE_KEY, true); } public static void removeCachedProducts() { - SDKCacheUtils.getCache().removeCache(PRODUCT_CACHE_KEY); + SDKCacheUtils.getCache().removeCache(PRODUCT_CACHE_KEY, true); } public static void removeCachedConfigurations() { - SDKCacheUtils.getCache().removeCache(CONFIG_CACHE_KEY); + SDKCacheUtils.getCache().removeCache(CONFIG_CACHE_KEY, true); } } diff -r 5a696c4ef747 -r 5b2d8f8c613b core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java Tue Aug 17 15:50:47 2010 -0700 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java Wed Aug 18 13:58:10 2010 -0500 @@ -645,7 +645,7 @@ } protected void clearSDKCache() { - SDKCacheUtils.getCache().removeCache(SDK_MANAGER_CACHE_KEY); + SDKCacheUtils.getCache().removeCache(SDK_MANAGER_CACHE_KEY, false); } @SuppressWarnings("unchecked") diff -r 5a696c4ef747 -r 5b2d8f8c613b core/com.nokia.cpp.utils.core/src/com/nokia/cpp/internal/api/utils/core/CacheUtils.java --- a/core/com.nokia.cpp.utils.core/src/com/nokia/cpp/internal/api/utils/core/CacheUtils.java Tue Aug 17 15:50:47 2010 -0700 +++ b/core/com.nokia.cpp.utils.core/src/com/nokia/cpp/internal/api/utils/core/CacheUtils.java Wed Aug 18 13:58:10 2010 -0500 @@ -102,11 +102,13 @@ return result; } - public void removeCache(String identifier) { + public void removeCache(String identifier, boolean removeFromDisk) { CacheEntry cache = caches.get(identifier); if (cache != null) { caches.remove(identifier); - cache.delete(); + if (removeFromDisk){ + cache.delete(); + } } }