russian-doll-caching

rails4 double nested models russian-doll-caching

非 Y 不嫁゛ 提交于 2019-12-11 10:21:58
问题 I have the following structure in my rails4 app for the posts. Users can comment on the post and replies can be written on the comments. I'd like to use russian-doll-caching with auto-expiring keys on the page, but I don't know how I should exactly do it in this case. Can sby tell me how to use it in this case? Models: #post.rb belongs_to :user has_many :post_comments, dependent: :destroy #post_comments.rb belongs_to :user belongs_to :post has_many :post_comment_replies, dependent: :destroy

Issues using Russian Doll Caching with Template Inheritance

◇◆丶佛笑我妖孽 提交于 2019-12-06 08:15:48
问题 I have been using both Template Inheritance and Russian Doll Caching (using the cache_digests gem) independently of one another in select portions of a fairly complex Rails application, with much success. I am having difficulty using the two technologies together, in a sane way, which makes me suspect that I may be doing something wrong... For an extremely simple example, consider an application consisting of two controllers, ThingOnes and ThingTwos. This application has one layout ( layouts

Issues using Russian Doll Caching with Template Inheritance

Deadly 提交于 2019-12-04 14:07:58
I have been using both Template Inheritance and Russian Doll Caching (using the cache_digests gem ) independently of one another in select portions of a fairly complex Rails application, with much success. I am having difficulty using the two technologies together, in a sane way, which makes me suspect that I may be doing something wrong... For an extremely simple example, consider an application consisting of two controllers, ThingOnes and ThingTwos. This application has one layout ( layouts/application.html.erb ) which simply renders a header file with: <%= render 'header' %> . By default,