angular的缓存机制

来源:互联网 发布:天音淘宝宝贝复制软件 编辑:程序博客网 时间:2024/06/05 06:58

缓存数据,不仅能使数据得到存储,而且使项目能进行客观的性能优化。

$http的缓存

$http({     method: 'GET',     url: 'api/user.json',     cache: true})

缓存能够服务的请求越多,整体系统性能就能提升越多。

自定义请求

$http({     method: 'GET',     url: 'api/user.json',     cache: myCache})


原创粉丝点击