import com.jakewharton.disklrucache.DiskLruCache;
import com.owncloud.android.BuildConfig;
-import com.owncloud.android.utils.Log_OC;
+import com.owncloud.android.lib.common.utils.Log_OC;
public class DiskLruImageCache {
private StringBuffer mValidKeyBuffer = new StringBuffer(64);
private StringBuffer mConversionBuffer = new StringBuffer(2).append('_');
- private static final String TAG = "DiskLruImageCache";
+ private static final String TAG = DiskLruImageCache.class.getSimpleName();
public DiskLruImageCache( Context context,String uniqueName, int diskCacheSize,
CompressFormat compressFormat, int quality ) throws IOException {
return mValidKeyBuffer.toString();
}
+ /**
+ * Remove passed key from cache
+ * @param key
+ */
+ public void removeKey( String key ) {
+ String validKey = convertToValidKey(key);
+ try {
+ mDiskCache.remove(validKey);
+ Log.d(TAG, "removeKey from cache: " + validKey);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
}
\ No newline at end of file