orbit-strategies-unofficial
v0.1.3
Published
Experimental strategies for Orbit.js
Downloads
11
Maintainers
Readme
orbit-strategies-unofficial
Experimental strategies for Orbit.js
Usage
This package contains preconfigured strategies for Orbit.js.
PessimisticStrategy
if you are familiar withember-data
, you will get a very similar caching policy – you can add areload
orbackgroundReload
options to your queries. Plus by default a retry policy is applied.OptimisticStrategy
should be used in combination withBackupStrategy
. Just likePessimisticStrategy
it includes caching and retry policies, but is designed to be offline first. By default it will drop any failed remote queries and respond with local data. For updates you need to overridecatch
hook to handle failures.
Installation
yarn add orbit-strategies-unofficial
Contributing
Installation
yarn install
Building
Distributions can be built to the /dist
directory by running:
yarn build
Testing
CI Testing
Test in CI mode by running:
yarn test
Browser Testing
Test within a browser (at http://localhost:4200/tests/) by running:
yarn testem
License
MIT License (see LICENSE for details).