[Angular] Freshness Caching Policy - Network First, Cache Last
In some cases, you want to get fresh data instead of cache data to the screen, such as stock applications.
Only fallback to cache data if cannot get response from API, we can aslo add timeout for example 10s.
{
"index": "/index.html",
"assetGroups": [{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html"
],
"versionedFiles": [
"/*.bundle.css",
"/*.bundle.js",
"/*.chunk.js"
]
}
}, {
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**"
]
}
}],
"dataGroups": [
{
"name": "lessons-api",
"urls": [
"/api/lessons"
],
"cacheConfig": {
"strategy": "freshness",
"timeout":"10s",
"maxAge": "1d",
"maxSize":
}
}
]
}
[Angular] Freshness Caching Policy - Network First, Cache Last的更多相关文章
- [Angular] Performance Caching Policy - Cache First, Network Last
If you want to cache API response by using angular service-worker, you can do it in: src/ngsw-config ...
- 服务器主机上RAID Card的Write Caching Policy
在Cisco Server的DRAC中, 创建virtual drive时, 会看到下面的选项. 那么Write back, write through, write back bad BBU之间 ...
- Is Safari on iOS 6 caching $.ajax results? post Cache
https://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results Since the upgra ...
- [中英对照]Why Redis beats Memcached for caching | 在cache化方面,为何Redis胜过Memcached?
对Memcached和Redis有兴趣的同学不妨花几分钟读一读本文,否则请飘过. Why Redis beats Memcached for caching | 在cache化方面,为何Redis胜过 ...
- Network Stack : HTTP Cache
HTTP Cache 目录 1 Operation 2 Sparse Entries 3 Truncated Entries 4 Byte-Range Requests 5 HttpCache::Tr ...
- Cache管理机制(System.Web.Caching)
一,System .Web.Caching与缓存工作机制简介 System.Web.Caching是用来管理缓存的命名空间,其父级空间是System.Web,由此可见,缓存通常用于Web网站的开发,包 ...
- 谷歌开发者工具 Network:Disable cache 和 Preserve log
参考博文地址:https://my.oschina.net/af666/blog/871793 Network Disable cache(禁止缓存):勾上,修改代码之后,刷新页面没有更新,看有没有禁 ...
- Caching Tutorial
for Web Authors and Webmasters This is an informational document. Although technical in nature, it a ...
- 禁用Java DNS缓存-Disable DNS caching
Once an application has performed network access (i.e. urlconnection, parsing of xml document with e ...
随机推荐
- Coursera Algorithms week1 查并集 练习测验:1 Social network connectivity
题目原文描述: Given a social network containing. n members and a log file containing m timestamps at which ...
- 0509 关于Ajax + 三级联动示例
关于Ajax 1.干什么的? ajax负责抓取用户名信息,传递给服务器进行校验: 2.属性: onreadystatechange:事件,该事件可以感知ajax状态(readyState)的变化.aj ...
- codevs1060 搞笑世界杯(概率dp)
1060 搞笑世界杯 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题目描述 Description 随着世界杯小组赛的结束,法国,阿根廷等世界 ...
- Django day05 虚拟环境 django 2.0和django 1.0 路由层区别
一:虚拟环境 创建虚拟环境一般有三种方式: 1) File--->New Project--> 出现如下图,点击Project Interpreter:New Virtualenv e ...
- vmware 14黑屏处理办法
从12升级到了14,但是发现所有的虚拟机都不能用了,黑屏.挂起的时候反而会显示界面,但是继续运行就是黑屏. 记录下解决办法. 修复LSP 以管理员身份运行CMD命令: netsh winsock re ...
- [转]RDLC报表格式化format表达式
本文转自:http://www.cnblogs.com/samlin/archive/2012/04/17/FormatDateTime.html 刚开始接触RDLC报表,觉得RDLC报表提供的格式化 ...
- 笔记《javascript高级程序设计》 第12章 DOM2和DOM3
DOM2 级核心:在 1 级基础上构建,为节点添加更多方法和属性 DOM2 级视图:为文档定义了基于样式信息的不同视图 DOM2 级事件:说明了如何使用事件和DOM文档交互 DOM2 级样式:如何以编 ...
- My97DatePicker 动态设置有效/无效日期
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding= ...
- Linux通信之异步通知模式
[参考]韦东山 教学笔记 为了使设备支持异步通知机制,驱动程序中涉及以下3项工作:1. 支持F_SETOWN命令,能在这个控制命令处理中设置filp->f_owner为对应进程ID. 不过此项工 ...
- CSS框架Bootstrap
作为一个软件开发人员,经常接触和使用框架是再平常的事情不过了.但是这些框架基本都是和语言相关的,比如WEB框架SpringMVC,JavaEE框架Spring,ORM框架Hibernate,还有Jav ...