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

Caching improvements #298

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

dirk
Copy link

@dirk dirk commented Oct 6, 2015

Implementation of the serialization-deserialization-overhead-eliminating strategy outlined in #289. Please see that issue for an outline and general details of the strategy.

This removes the need to serialize-and-then-deserialize-again
cached values per the proposal outlined in rails#289.
@rails-bot
Copy link

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @rwz (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@dirk
Copy link
Author

dirk commented Oct 6, 2015

Please see this comment on the proposal pull request for performance results.

Gemfile Outdated
@@ -3,6 +3,7 @@ source "https://rubygems.org"
gemspec

gem "rake"
gem "rails"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an oversight? We shouldn't need to bring in the entire Rails gem into jbuilder, right?

@woodhull woodhull mentioned this pull request Dec 21, 2016
@rromanchuk
Copy link

@dirk would love to try this out, do you have a fork you are maintaining for your own projects?

@rromanchuk
Copy link

have you seen before?

ActionView::Template::Error (can't add a new key into hash during iteration): occurs when there is another nested cache!

@mactkg
Copy link

mactkg commented Jul 27, 2017

@rromanchuk I think the error is raised when a template call same template itself.

# model/_template.jbuilder
if model[:child].present?
  json.child model[:child], partial: 'model/template', as: :model
else
  json.child []
end

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

Successfully merging this pull request may close these issues.

6 participants