<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Jbeduya's Code Snippets</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 12 Oct 2008 06:29:39 GMT</pubDate>
    <description>DZone Snippets: Jbeduya's Code Snippets</description>
    <item>
      <title>ActiveRecord: cache column information</title>
      <link>http://snippets.dzone.com/posts/show/3926</link>
      <description>// Cache the column information so that no more query will be &lt;br /&gt;// sent to the server thereafter&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;class ActiveRecord::Base&lt;br /&gt;	&lt;br /&gt;	@@_cached_columns = {}&lt;br /&gt;	class &lt;&lt; self&lt;br /&gt;		&lt;br /&gt;		alias :old_columns :columns&lt;br /&gt;		&lt;br /&gt;		def columns&lt;br /&gt;			return @@_cached_columns[table_name] if @@_cached_columns[table_name]&lt;br /&gt;			@@_cached_columns[table_name] = old_columns&lt;br /&gt;		end&lt;br /&gt;		&lt;br /&gt;	end&lt;br /&gt;	&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Fri, 27 Apr 2007 21:24:48 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3926</guid>
      <author>jbeduya (Junrey Beduya)</author>
    </item>
  </channel>
</rss>
