jQuery AJAX 缓存插件 jquery-ajax-cache
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/WQTeam/jquery-ajax-cache
- 软件文档: https://github.com/WQTeam/jquery-ajax-cache
软件介绍
jquery-ajax-cache 是 jQuery 插件——利用‘localStorage’ 和 ‘sessionStorage’ 对 jQuery AJAX 请求进行缓存。
引入
<script src="../node_modules/jquery/dist/jquery.js"></script> <script src='../dist/jquery-ajax-cache.js'></script>
使用
全局配置
$ajaxCache.config({ cacheValidate: function (res) { //选填,配置全局的验证是否需要进行缓存的方法,“全局配置” 和 ”自定义“,至少有一处实现cacheValidate方法 return res.state === 'ok';
},
storageType: 'localStorage', //选填,‘localStorage’ or 'sessionStorage', 默认‘localStorage’ timeout: 60 * 60, //选填, 单位秒。默认1小时 });简单使用
$.ajax({
ajaxCache: true // “全局配置” 和 ”自定义“,至少有一处实现cacheValidate方法 /* others... */ });自定义
$.ajax( // 此处的参数会覆盖‘全局配置’中的设置 ajaxCache: { cacheValidate: function (res) { //选填,配置全局的验证是否需要进行缓存的方法, “全局配置” 和 ”自定义“,至少有一处实现cacheValidate方法 return res.state === 'ok' && res.code ==='200';
},
storageType: 'localStorage', //选填,‘localStorage’ or 'sessionStorage', 默认‘localStorage’ timeout: 60 * 60, //选填, 单位秒。默认1小时 }
});
UNIX网络编程
史蒂文斯、芬纳、鲁道夫 / 杨继张 / 清华大学出版社 / 2006-1 / 98.00元
《UNIX网络编程》(第1卷)(套接口API第3版)第1版和第2版由已故UNIX网络专家W. Richard Stevens博士独自编写。《UNIX网络编程》(第1卷)(套接口API第3版)是3版,由世界著名网络专家Bill Fenner和Andrew M. Rudoff执笔,根据近几年网络技术的发展,对上一版进行全面修订,增添了IPv6的更新过的信息、SCTP协议和密钥管理套接口的内容,删除了X......一起来看看 《UNIX网络编程》 这本书的介绍吧!
