ASimpleCache icon indicating copy to clipboard operation
ASimpleCache copied to clipboard

清除缓存的问题

Open dfshizhiqiang opened this issue 9 years ago • 3 comments

调用cache.clear()方法后,不能重新创建ACache目录

dfshizhiqiang avatar Jul 13 '15 11:07 dfshizhiqiang

直接App中清除缓存,ACache好像也不能使用了,不知道怎么回事

sunchengjian avatar Apr 19 '19 02:04 sunchengjian

We have encountered a similar problem, and we have verified that we can fix it. The code is as follows

public static ACache get(Context ctx) { File file = new File(ctx.getCacheDir() + File.separator + "ACache"); if (!file.exists()) { file.mkdirs(); }

    return get(ctx, "ACache");
}

SoftwareME avatar Jun 04 '19 06:06 SoftwareME

if (manager == null || !cacheDir.exists()) { manager = new ACache(cacheDir, max_zise, max_count); mInstanceMap.put(cacheDir.getAbsolutePath() + myPid(), manager); }

oldpan1310 avatar Sep 16 '21 03:09 oldpan1310