Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objects as request parameters don't properly serialize in cache keys #44

Open
hazeledmands opened this issue Sep 25, 2014 · 0 comments
Open
Labels

Comments

@hazeledmands
Copy link
Contributor

When you make a request like this:

var Derp = $cachedResource('derp', 'http://herp.com/derp/:id')
Derp.query({where: {createdAt: { $lt: 5 } } })

rght now we're ending up with keys like this:

cachedResource://derp/array?query=[Object object]

when we should have something like this:

cachedResource://derp/array?query={where:{createdAt:{$lt:5}}}

We need to be careful that the serialization scheme is deterministic (alphabetize keys, etc) so that the same query always uses the same resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant