Skip to content

rm cached attributes#15429

Merged
rafaelfranca merged 1 commit intorails:masterfrom
sgrif:sg-rm-cached-attributes
Jun 11, 2014
Merged

rm cached attributes#15429
rafaelfranca merged 1 commit intorails:masterfrom
sgrif:sg-rm-cached-attributes

Conversation

@sgrif
Copy link
Copy Markdown
Contributor

@sgrif sgrif commented May 30, 2014

The original patch that added this concept can be found here. The current default behavior is to cache everything except serialized columns, unless the user specified otherwise. If anyone were to specify otherwise, many types would actually be completely broken. Still, the method is left in place with a deprecation warning in case anyone is actually still calling this method.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need to deprecate this one too.

@rafaelfranca
Copy link
Copy Markdown
Member

@jeremy WDYT?

@sgrif
Copy link
Copy Markdown
Contributor Author

sgrif commented May 30, 2014

Note: This does not change behavior for anyone who has not called cache_attributes on a model.

@sgrif
Copy link
Copy Markdown
Contributor Author

sgrif commented Jun 6, 2014

@jeremy Ping!

@sgrif
Copy link
Copy Markdown
Contributor Author

sgrif commented Jun 7, 2014

@rafaelfranca @jeremy Any more feedback on this? Need this for what I'm working on.

@sgrif
Copy link
Copy Markdown
Contributor Author

sgrif commented Jun 9, 2014

@rafaelfranca @jeremy Ping!

@rafaelfranca
Copy link
Copy Markdown
Member

For me it is :shipit: but maybe @jeremy is using it for something or he knows some use case that we are not aware of. I'll try to get him reviewing it.

@sgrif
Copy link
Copy Markdown
Contributor Author

sgrif commented Jun 9, 2014

Thank you! 😄

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Calling cache_attributes is no longer necessary. All attributes are cached."

The last sentence talking about downsides makes sense to Rails implementors, not app developers.

@sgrif
Copy link
Copy Markdown
Contributor Author

sgrif commented Jun 10, 2014

Updated.

@jeremy
Copy link
Copy Markdown
Member

jeremy commented Jun 10, 2014

👍

The original patch that added this concept can be found
[here](https://web.archive.org/web/20090601022739/http://dev.rubyonrails.org/ticket/9767).
The current default behavior is to cache everything except serialized
columns, unless the user specified otherwise. If anyone were to specify
otherwise, many types would actually be completely broken. Still, the
method is left in place with a deprecation warning in case anyone is
actually still calling this method.
rafaelfranca added a commit that referenced this pull request Jun 11, 2014
@rafaelfranca rafaelfranca merged commit 70b931f into rails:master Jun 11, 2014
sgrif added a commit to sgrif/protected_attributes that referenced this pull request Jun 14, 2014
@sgrif sgrif deleted the sg-rm-cached-attributes branch June 14, 2014 01:15
@samwgoldman
Copy link
Copy Markdown

Sorry, I know this is old, but I am confused by this change. Why was it necessary? The comments indicate that many types would be broken, but which ones, and how? Why should string-valued attributes be cached?

zzak pushed a commit that referenced this pull request Aug 20, 2014
Remove cached attributes from Configuring guide [ci skip]

This was removed in #15429
revoltig4sg pushed a commit to revoltig4sg/protected_attributes that referenced this pull request Aug 19, 2023
tigrevol8888 added a commit to tigrevol8888/protected_attributes that referenced this pull request Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants