简体   繁体   English

android中已弃用的cachemanager类的替代方法是什么?

[英]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.

相关问题 Android中已弃用的People类的替代方法 - Alternative for the deprecated People class in Android HttpEntity现在在Android上被弃用了,还有什么选择? - HttpEntity is deprecated on Android now, what's the alternative? Android中不推荐使用的AbsoluteLayout替代品是什么? - What's alternative to deprecated AbsoluteLayout in Android? Android:StatusLine 现在已弃用,有什么替代方案? - Android: StatusLine now deprecated, what is the alternative? Android getAllNetworkInfo() 已弃用。 有什么选择? - Android getAllNetworkInfo() is Deprecated. What is the alternative? onBackPressed() 已弃用,有什么替代方案? - onBackPressed() deprecated, What is the alternative? getSerializableExtra 已弃用,有什么替代方案? - getSerializableExtra deprecated, What is the alternative? getParcelableArrayListExtra 已弃用 有什么替代方案? - getParcelableArrayListExtra deprecated what is the alternative? 已弃用的 android.hardware.camera.autofocus 的替代过滤器是什么? - What is the alternative filter for deprecated android.hardware.camera.autofocus? 从API 17开始,Android WebView中不推荐使用私有浏览。有什么替代方案? - Private Browsing is deprecated in Android WebView as of API 17. What is the alternative?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM