我希望能够创建一个自定义AngularJS服务,该服务在其数据对象为空时发出HTTP"Get"请求,并在成功时填充数据对象.
下次调用此服务时,我想绕过再次发出HTTP请求的开销,而是返回缓存的数据对象.
这可能吗?
ajax caching http-get angularjs
ajax ×1
angularjs ×1
caching ×1
http-get ×1