エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Ryan's Scraps: What's New in Edge Rails: Easy Memoization
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Ryan's Scraps: What's New in Edge Rails: Easy Memoization
class Person < ActiveRecord::Base def social_security @social_security ||= decrypt_social_securit... class Person < ActiveRecord::Base def social_security @social_security ||= decrypt_social_security end ... end The big problem with this common type of memoization is that you’ve littered your method implementation with caching logic. Caching is best applied in a transparent manner – and ActiveSupport now lets you easily insert memoization into your classes: class Person < ActiveRecord::Base def s