Skip to content

Commit 7d1ccf8

Browse files
authored
add ember-cached-shoe info to README.md
1 parent 6eb6684 commit 7d1ccf8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,27 @@ export default Ember.Route.extend({
376376
});
377377
```
378378

379+
### Think out of the Shoebox
380+
381+
Shoebox gives you great capabilities, but using in in the real app is pretty rough. Have you ever thought that such kind of logic should be done behind the scenes? In a large codebase, defining `fastboot.isFastboot` conditionals can be a daunting task. Furthermore, it generates a lot of boilerplate code, which obscures the solution. Sooner or later coupling with `shoebox` will spread over all routes.
382+
383+
That's why [ember-cashed-shoe](https://www.npmjs.com/ember-cached-shoe) was born.
384+
385+
After installing and applying it, your routes can look like this:
386+
387+
`app/routes/my-route.js`:
388+
389+
```javascript
390+
import Ember from 'ember'
391+
392+
export default Ember.Route.extend({
393+
model() {
394+
this.store.findAll('posts') // called twice, second call serves cached response
395+
}
396+
})
397+
```
398+
And they still take advantage of caching in the `shoebox`. No more redundant AJAX for already acquired data. Installation details are available in the addon [README](https://github.com/appchance/ember-cached-shoe#ember-cached-shoe).
399+
379400
## Build Hooks for FastBoot
380401

381402
### Disabling incompatible dependencies

0 commit comments

Comments
 (0)