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

Support cache: false for individual fields #10

Open
dblock opened this issue Jan 23, 2013 · 2 comments
Open

Support cache: false for individual fields #10

dblock opened this issue Jan 23, 2013 · 2 comments
Labels

Comments

@dblock
Copy link
Collaborator

dblock commented Jan 23, 2013

Add an option not to cache specific relationships.

@fancyremarker
Copy link
Contributor

Good call! This would help rectify stale cache issues with existing API endpoints that reference resources across collections.

@joeyAghion
Copy link

The case for doing this on a per-field basis is interesting but not one I'd thought of. My use case involves a model that changes frequently enough and is sensitive enough that I want to avoid caching its JSON representation at all. But, it would be nice if I could still declare the as_json schema (including different sets of properties, etc.) with a json_fields declaration in the same way as in my Mongoid::CachedJson models.

To summarize: this gem currently provides 2 things: a nice syntax for declaring a model's JSON schema, and caching of those results. Maybe it's worth considering how to offer those separately?

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

3 participants