{"type":"rich","url":"https://taslam.hatenadiary.org/entry/20071019/1195277390","blog_url":"https://taslam.hatenadiary.org/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftaslam.hatenadiary.org%2Fentry%2F20071019%2F1195277390\" title=\"\u300c\u30af\u30ec\u30a4\u30b8\u30fc\u300d\u306a\u30ad\u30e3\u30c3\u30b7\u30e5 - taslam\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","author_url":"https://blog.hatena.ne.jp/taslam/","version":"1.0","width":"100%","published":"2007-10-19 14:29:50","author_name":"taslam","description":"yoshitetsu\u306e\u65e5\u8a18:acts_as_cached\u3092\u4f7f\u3046\u3092\u53c2\u8003\u306b\u5c0e\u5165\u3057\u3066\u307f\u305f\u3002 @categories = Category.get_cache(:all) do Category.find(:all, :order => 'index') end \u30d6\u30ed\u30c3\u30af\u3092\u6e21\u3059\u3068\u3001\u30d6\u30ed\u30c3\u30af\u306e\u623b\u308a\u5024\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u307e\u3059\u3002 # acts_as_cached.rb # key \u306fget_cache\u306e\u5f15\u6570 data = block_given? ? yield : find_data(id) set_to_cache(key, data, ttl) return data \u3053\u306e\u3068\u304d\u3001get_cache\u306e\u5f15\u6570:a\u2026","image_url":null,"title":"\u300c\u30af\u30ec\u30a4\u30b8\u30fc\u300d\u306a\u30ad\u30e3\u30c3\u30b7\u30e5","categories":["rails","plugin","acts_as_cached"],"provider_name":"Hatena Blog","blog_title":"taslam\u306e\u65e5\u8a18","provider_url":"https://hatena.blog"}