[英]what is the alternative for the deprecated cachemanager class in android
I see that cachemanager is a deprecated class in Android sdk. 我看到cachemanager是Android sdk中不推荐使用的类。 So what is the substitiute of cachemanager.
那么cachemanager的替代品是什么呢? I see a way with the data storage techniques.
我看到了数据存储技术的一种方式。 but how are they supposed to implement the cache algorithm.
但他们如何实施缓存算法呢? Does everyone has to write there own Cachemanagers.
每个人都必须写自己的Cachemanagers。
I guess it depends on what kind of cache you are looking for. 我想这取决于你正在寻找什么样的缓存。 ICS adds a built-in HTTP response cache, see this blog post for more info.
ICS添加了内置的HTTP响应缓存,有关详细信息,请参阅此博客文章 。
If you are looking for a more general disk cache then the ICS source code has a nice class called DiskLruCache (not available in the public APIs though). 如果您正在寻找更通用的磁盘缓存,那么ICS源代码有一个很好的类叫做DiskLruCache(虽然在公共API中不可用)。 It has been back ported and released by a 3rd party though: DiskLruCache .
它已被第三方反向移植和发布: DiskLruCache 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.