xUtils - android工具库,大量更新:bug修复,缓存优化,GET请求加入lru缓存。
来源:互联网 发布:灯具数据图 编辑:程序博客网 时间:2024/05/16 05:43
感谢大家最近一段时间对xUtils的关注,和给我bug反馈,这也使我在xUtils的开发上更有热情。
昨天晚上熬夜到5点多,完成了缓存模块的整理和结构优化,今天在此基础上有完成了给http模块添加GET请求文本内容时实现LRU缓存的工作,现在可设置缓存默认过期时间和针对当前请求的过期时间。
最新的源码从这里获取:https://github.com/wyouflf/xUtils
昨天晚上熬夜到5点多,完成了缓存模块的整理和结构优化,今天在此基础上有完成了给http模块添加GET请求文本内容时实现LRU缓存的工作,现在可设置缓存默认过期时间和针对当前请求的过期时间。
最新的源码从这里获取:https://github.com/wyouflf/xUtils
标签: xUtils afinal
[1].[代码] GET请求缓存使用示例: 跳至 [1]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
private
void
testGet() {
RequestParams params =
new
RequestParams();
params.addQueryStringParameter(
"method"
,
"info"
);
params.addQueryStringParameter(
"access_token"
,
"3.1042851f652496c9362b1cd77d4f849b.2592000.1377530363.3590808424-248414"
);
HttpUtils http =
new
HttpUtils();
http.configCurrRequestExpiry(
1000
*
10
);
http.send(HttpRequest.HttpMethod.GET,
"https://pcs.baidu.com/rest/2.0/pcs/quota"
,
params,
new
RequestCallBack<String>() {
@Override
public
void
onStart() {
testTextView.setText(
"conn..."
);
}
@Override
public
void
onLoading(
long
total,
long
current) {
testTextView.setText(current +
"/"
+ total);
}
@Override
public
void
onSuccess(String result) {
testTextView.setText(
"response:"
+ result);
}
@Override
public
void
onFailure(Throwable error, String msg) {
testTextView.setText(msg);
}
});
}
0 0
- xUtils - android工具库,大量更新:bug修复,缓存优化,GET请求加入lru缓存。
- Android Xutils框架HttpUtil Get请求缓存问题
- Android Xutils框架HttpUtil Get请求缓存问题
- Android之Lru缓存
- Android 缓存大量 bitmap
- get请求缓存问题
- Android大图加载优化--基于LRU算法的本地文件缓存
- Android LRU缓存算法实现
- Android--LRU缓存实现(Java)
- LRU缓存
- LRU缓存
- LRU缓存
- 缓存-LRU
- dede 修复更新联动缓存 不更新联动js的bug
- android 缓存管理及LRU算法
- Android 缓存管理和LRU 算法
- android 缓存管理及LRU算法
- android 缓存管理及LRU算法
- adb shell 加su的问题记录
- Apache Shiro
- Linux 命令行更新android sdk
- Android中arrayAdapter的使用
- 安全系统简介
- xUtils - android工具库,大量更新:bug修复,缓存优化,GET请求加入lru缓存。
- poj 3176 Cows Bowling
- Xcode6 和 Cocos2dx3.1以下版本的不兼容问题
- ubuntu12.04 samba服务器配置
- iOS Category的简单使用
- C语言实现的list -- 源码摘自wine
- Linux C 多线程执行顺序问题
- 记得有一个爱你
- append和appendTo