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

Fields is not part of the cache key #1

Open
mihneasim opened this issue May 15, 2015 · 2 comments
Open

Fields is not part of the cache key #1

mihneasim opened this issue May 15, 2015 · 2 comments

Comments

@mihneasim
Copy link

I didn't have the opportunity to go very far on this, but I suspect the cache is not usable.
I think "fields" query string parameter is not part of the key - so the first call will be cached and returned no matter which fields are specified (if any) on subsequent requests. I'll dig some more when i have some spare time and maybe suggest a patch.

@dan-klasson
Copy link
Owner

Not sure what you mean by that. There is no caching involved here. Basically all it does is break down the field parameter(s) to use a standard Django ORM query using only() and select_related() for FKs.

@mihneasim
Copy link
Author

It's the cache property on Resource class http://django-tastypie.readthedocs.org/en/v0.9.11/caching.html#simplecache
I have to replicate a simple setup with memcache backend, SpecifiedFields.cache set to SimpleCache and I will update this issue.

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

No branches or pull requests

2 participants