@warp-drive/ember 0.0.0-beta.6 → 0.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -4
- package/dist/index.js +386 -144
- package/dist/index.js.map +1 -1
- package/package.json +42 -31
- package/unstable-preview-types/-private/await.d.ts.map +1 -1
- package/unstable-preview-types/-private/request.d.ts +120 -2
- package/unstable-preview-types/-private/request.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +1 -1
package/README.md
CHANGED
|
@@ -472,9 +472,18 @@ import { Request } from '@warp-drive/ember';
|
|
|
472
472
|
|
|
473
473
|
- Autorefresh behavior
|
|
474
474
|
|
|
475
|
-
Requests can be made to automatically refresh
|
|
476
|
-
|
|
477
|
-
|
|
475
|
+
Requests can be made to automatically refresh under any combination of three separate conditions
|
|
476
|
+
by supplying a value to the `@autorefresh` arg.
|
|
477
|
+
|
|
478
|
+
- `online` when a browser window or tab comes back to the foreground after being backgrounded
|
|
479
|
+
or when the network reports as being online after having been offline.
|
|
480
|
+
- `interval` which occurs whenever `@autorefreshThreshold` has been exceeded
|
|
481
|
+
- `invalid` which occurs when the store associated to the request emits an invalidation notification for the request in use.
|
|
482
|
+
|
|
483
|
+
These conditions can be used in any combination by providing a comma separated list e.g.
|
|
484
|
+
`interval,invalid`
|
|
485
|
+
|
|
486
|
+
A value of `true` is equivalent to `online,invalid`.
|
|
478
487
|
|
|
479
488
|
```gjs
|
|
480
489
|
import { Request } from '@warp-drive/ember';
|
|
@@ -496,7 +505,7 @@ Options are:
|
|
|
496
505
|
|
|
497
506
|
- `refresh` update while continuing to show the current state.
|
|
498
507
|
- `reload` update and show the loading state until update completes)
|
|
499
|
-
- `
|
|
508
|
+
- `policy` (**default**) trigger the request, but let the cache handler decide whether the update should occur or if the cache is still valid.
|
|
500
509
|
|
|
501
510
|
---
|
|
502
511
|
|