Caching Ajax Result without Model?


#1

I’ve wrapped a Bootstrap Typeahead into a component that renders in application.hbs so that the input box with typeahead renders at the top of every page in my app.

Right now, I’m pulling the data for the typeahead through an Ajax query that executes again on every refresh and transition. I thought about setting up a model and using Ember Data to store the typeahead data, but that would seem to require rewriting all of my routes, templates, and components to reflect an RSVP hash of the typeahead model with the route-specific model…

The simpler solution would seem to be caching the typeahead data into the store directly from the component. Alas, I can’t seem to figure out how to do that…

Or is there a better way to do this that hasn’t occurred to me?