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的更多相关文章

  1. [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 ...

  2. 服务器主机上RAID Card的Write Caching Policy

    在Cisco Server的DRAC中, 创建virtual drive时, 会看到下面的选项.   那么Write back, write through, write back bad BBU之间 ...

  3. 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 ...

  4. [中英对照]Why Redis beats Memcached for caching | 在cache化方面,为何Redis胜过Memcached?

    对Memcached和Redis有兴趣的同学不妨花几分钟读一读本文,否则请飘过. Why Redis beats Memcached for caching | 在cache化方面,为何Redis胜过 ...

  5. Network Stack‎ : HTTP Cache

    HTTP Cache 目录 1 Operation 2 Sparse Entries 3 Truncated Entries 4 Byte-Range Requests 5 HttpCache::Tr ...

  6. Cache管理机制(System.Web.Caching)

    一,System .Web.Caching与缓存工作机制简介 System.Web.Caching是用来管理缓存的命名空间,其父级空间是System.Web,由此可见,缓存通常用于Web网站的开发,包 ...

  7. 谷歌开发者工具 Network:Disable cache 和 Preserve log

    参考博文地址:https://my.oschina.net/af666/blog/871793 Network Disable cache(禁止缓存):勾上,修改代码之后,刷新页面没有更新,看有没有禁 ...

  8. Caching Tutorial

    for Web Authors and Webmasters This is an informational document. Although technical in nature, it a ...

  9. 禁用Java DNS缓存-Disable DNS caching

    Once an application has performed network access (i.e. urlconnection, parsing of xml document with e ...

随机推荐

  1. 73. 解决ExtJS TreePanel 的 iconCls设置问题

    转自:https://blog.csdn.net/hanchuang213/article/details/62881568 很久没有写代码了,最近在做一个在线帮助网站,于是又捡起了 ExtJS,我用 ...

  2. JavaScript学习杂记

    1.DOM层级:document(document) --> doctype,documentElement(html) --> head,body(body). 2.offset, cl ...

  3. IPv6系列-初学者的10个常见困扰

    本文是<IPv6系列>文章的第二篇<常见困扰>,紧接<入门指南>,用于解答IPv6的10个常见困扰. 小慢哥的原创文章,欢迎转载 目录 ▪ 本文缘由 ▪ 困扰1. ...

  4. 记录一下Junit测试MongoDB,获取MongoTemplate

    只是自己记录一下,测试MongoDB帮助类时,没有配置文件的测试 public class HelperTest { MongoTemplate template; @Before public vo ...

  5. Nginx报错-找不到路径

    前言 最近在git bash里输入命令启动Nginx服务,总提示找不到路径,令我困惑不已        我反复检查安装路径和输入命令,确认无误    小技巧:复制路径可直接ctrl+c后在git ba ...

  6. python 3:str.upper()与str.lower()(使字符串字母全部大写或小写)

    name = "Hello,World! Hello,Python!" print(name.upper()) #字母全部大写 print(name.lower()) #字母全部小 ...

  7. iOS多线程——GCD篇

    什么是GCD GCD是苹果对多线程编程做的一套新的抽象基于C语言层的API,结合Block简化了多线程的操作,使得我们对线程操作能够更加的安全高效. 在GCD出现之前Cocoa框架提供了NSObjec ...

  8. 如何使用Visual Studio调试C#程序

    当代码不能正常运行时,可以通过调试定位错误.常用的程序调试操作包括设置断点.开始.中断和停止程序的执行.单步执行程序以及使程序运行到指定的位置.下面将对这几种常用的程序调试操作进行详细地介绍. 1.断 ...

  9. Css小动画

    html页面: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF ...

  10. Deutsch lernen (15)

    1.    unterscheiden - unterschied - unterschieden  区别,区分:(能够)分清 Die beiden Begriffe sind nur schwer ...