Skip to content

Instantly share code, notes, and snippets.

@benaskins
Created February 10, 2009 05:21
Show Gist options
  • Select an option

  • Save benaskins/61253 to your computer and use it in GitHub Desktop.

Select an option

Save benaskins/61253 to your computer and use it in GitHub Desktop.
>> NewsItem.most_popular
Cache miss: NewsItem.most.popular ({})
NewsItem Load (0.4ms) SELECT * FROM `contents` WHERE ( (`contents`.`type` = 'NewsItem' ) ) ORDER BY view_count desc
Cache write (will save 1.13ms): NewsItem.most.popular
=> [#<NewsItem id: 602878370, category_id: 932759408, user_id: 549584997, view_count: 0, type: "NewsItem", title: "Choosing your first board", introduction: "<p>Intro</p>", full_description: "<p>News item details</p>", terms: nil, display_from: "2009-01-22", display_to: "2009-01-29", featured_item: true, allow_comments: false, created_at: "2009-01-19 23:04:32", updated_at: "2009-01-19 23:13:34">, #<NewsItem id: 602878371, category_id: 6924875, user_id: 325502115, view_count: 0, type: "NewsItem", title: "Learning to surf", introduction: "Intro", full_description: "News item details", terms: nil, display_from: "2009-01-22", display_to: "2009-01-29", featured_item: nil, allow_comments: nil, created_at: "2009-01-19 23:04:32", updated_at: "2009-01-19 23:04:32">]
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment