These are chat archives for canjs/canjs
Guys one question regarding caching data.
I have lots of requests to the same url to get different
Persons. For example I have a list of "cards" and for each card I have to do 2 requests for persons "author" and "recipient". "Author" is the same most of the time. So I would like to avoid unnecessary calls and cache all persons in...memory or localstorage I don't really care right now.
I see that
can.js provides different caching strategies like
and this seems like what I need. But when I try to apply this, it doesn't work. I have identical requests except
Authorization header, because by back-end design I have to send request with different tokens. Is this might prevent request caching ?
fall-through cachetaking data from
local-storagebut still doing the request right ? I would like to avoid requests itself so I need
that's my guess as to what is making it not understand the two requests are the same
It understands because I see that persons are added in
getDataalso, if you want to submit a proposal