/** * Indicates whether file cache should be updated. * * @param delete {@code true} if update should be forced, {@code false} to cancel update if cache * exists. * @return {@code true} if file should be cached, {@code false} if not. */ public boolean addToDb(boolean delete) { if (mDb == null) return false; if (!AllowDBCache) return false; return mDb.createItem(this, delete) > 0; }
public static final void flushDbCache() { if (mDb != null) mDb.clear(); }
/** Explicitly close the cache Database adapter. */ public static void closeDb() { try { if (mDb != null) mDb.close(); } catch (Exception e) { } }
public int deleteFolderFromDb() { if (!AllowDBCache) return 0; if (mDb != null) return mDb.deleteFolder(this); else return -1; }