<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>cevid_cpp</author_name>
  <author_url>https://blog.hatena.ne.jp/cevid_cpp/</author_url>
  <blog_title>ボクココ</blog_title>
  <blog_url>https://bokukoko.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>毎回同じDBアクセスの場合キャッシュしたくなりますよね。 今日はちょっと感動したコードを紹介。 Rails高速化にはこういうテクニックが必要ですなぁ。 class Area ActiveRecord::Base @@cache = nil class def find_default_area() unless @@cache @@cache = find(:all,:conditions....) end return @@cache end endendクラス変数にこういう形で使うとはなるほど、と思いました。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbokukoko.hatenablog.com%2Fentry%2F20120523%2F1337775361&quot; title=&quot;仕事で学んだイカしたRailsテクニック - ボクココ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-05-23 21:16:01</published>
  <title>仕事で学んだイカしたRailsテクニック</title>
  <type>rich</type>
  <url>https://bokukoko.hatenablog.com/entry/20120523/1337775361</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
