mozilla/yogafire — pull request #45 by ngokevin (2014-05-21 19:42:01+00:00)
Title: multi-layer caching into memory, refactor db.js (bug 1012790)

Limits the amount of reads from localForage we make as we browse Marketplace (currently, we hit localForage on every page). This also limits the amount of API hits to one per endpoint per session (and it would still be async).

- Every time we fetch data (from localForage, API, or package), dump it into a JS [Object object].
- Every time we access data, see if it is in the object.
- Re-enable requests.js session caching (we don't need to keep our data THAT up-to-date).
- Combine homepage/category db methods into one, since homepage is similar to a category.