// MUST NOT return null
try {
InputStream in = cache.load(originalUrl, false, stable);
- Instance.trace("Cache " + (in != null ? "hit" : "miss") + ": "
- + url);
+ Instance.getTraceHandler().trace(
+ "Cache " + (in != null ? "hit" : "miss") + ": " + url);
if (in == null) {
try {
return cache.load(uniqueID, true, true);
}
+ /**
+ * Remove the given resource from the cache.
+ *
+ * @param uniqueID
+ * a unique ID used to locate the cached resource
+ *
+ * @return TRUE if it was removed
+ */
+ public boolean removeFromCache(String uniqueID) {
+ return cache.remove(uniqueID);
+ }
+
/**
* Clean the cache (delete the cached items).
*