缓存数据,不仅能使数据得到存储,而且使项目能进行客观的性能优化。
$http的缓存
$http({
method: 'GET',
url: 'api/user.json',
cache: true
})
缓存能够服务的请求越多,整体系统性能就能提升越多。
自定义请求
$http({
method: 'GET',
url: 'api/user.json',
cache: myCache
})
缓存数据,不仅能使数据得到存储,而且使项目能进行客观的性能优化。
$http的缓存
$http({
method: 'GET',
url: 'api/user.json',
cache: true
})
自定义请求
$http({
method: 'GET',
url: 'api/user.json',
cache: myCache
})