mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-09-20 01:56:33 +00:00
back to network first caching
This commit is contained in:
parent
a83c37259b
commit
7b46935343
@ -128,7 +128,9 @@ class Login extends Component {
|
||||
autoFocus
|
||||
onInput={(e) => this.onPasteKey(e)}
|
||||
placeholder={t('paste_private_key')}
|
||||
type="password"
|
||||
/>
|
||||
{this.state.privateKeyError && <div className="error">{this.state.privateKeyError}</div>}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -22,8 +22,9 @@ registerRoute(
|
||||
// Make root page load instantly, even if offline. Tradeoff: after app update, user will see old version until they refresh.
|
||||
registerRoute(
|
||||
({ url }) => url.pathname === '/',
|
||||
new StaleWhileRevalidate({
|
||||
new NetworkFirst({
|
||||
cacheName: 'iris-main',
|
||||
networkTimeoutSeconds: 3,
|
||||
plugins: [
|
||||
new CacheableResponsePlugin({
|
||||
statuses: [0, 200], // no 404
|
||||
@ -64,9 +65,9 @@ registerRoute(
|
||||
},
|
||||
new NetworkFirst({
|
||||
cacheName: 'pages-etc',
|
||||
networkTimeoutSeconds: 3,
|
||||
plugins: [
|
||||
new ExpirationPlugin({
|
||||
networkTimeoutSeconds: 5,
|
||||
maxEntries: 100,
|
||||
maxAgeSeconds: 30 * 24 * 60 * 60,
|
||||
purgeOnQuotaError: true,
|
||||
|
Loading…
Reference in New Issue
Block a user