tmud-2.10.1/benchmark/
tmud-2.10.1/cmd/
tmud-2.10.1/cmd/objects/
tmud-2.10.1/cmd/tiny/
tmud-2.10.1/doc/classes/SQLite/
tmud-2.10.1/doc/classes/SQLite3/
tmud-2.10.1/doc/classes/TernaryTrie/
tmud-2.10.1/doc/files/cmd/objects/
tmud-2.10.1/doc/files/cmd/tiny/
tmud-2.10.1/doc/files/lib/
tmud-2.10.1/doc/files/lib/engine/
tmud-2.10.1/doc/files/lib/farts/
tmud-2.10.1/farts/
tmud-2.10.1/lib/
tmud-2.10.1/lib/core/
tmud-2.10.1/lib/engine/
tmud-2.10.1/lib/farts/
tmud-2.10.1/logs/
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: CacheStats</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">CacheStats</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/lib/storage/cache_rb.html">
                lib/storage/cache.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">
    <div id="diagram">
      <map id="map" name="map">
  <area shape="rect" coords="5,5,96,53"      href="CacheStats.html" alt="CacheStats
" />
  <area shape="rect" coords="120,5,232,53"      href="CacheManager.html" alt="CacheManager
" />
  <area shape="rect" coords="256,5,347,53"      href="CacheEntry.html" alt="CacheEntry
" />
</map>
<img src="../dot/f_42.png" usemap="#map" border="0" alt="dot/f_42.png">
    </div>

    <div id="description">
      <p>
This class stores the cache statistics.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000040">each</a>&nbsp;&nbsp;
      <a href="#M000039">inc</a>&nbsp;&nbsp;
      <a href="#M000038">new</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000038" class="method-detail">
        <a name="M000038"></a>

        <div class="method-heading">
          <a href="#M000038" class="method-signature">
          <span class="method-name">new</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000038-source">
<pre>
<span class="ruby-comment cmt"># File lib/storage/cache.rb, line 38</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
    <span class="ruby-ivar">@stats</span> = {}
  <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000040" class="method-detail">
        <a name="M000040"></a>

        <div class="method-heading">
          <a href="#M000040" class="method-signature">
          <span class="method-name">each</span><span class="method-args">(&amp;blk)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000040-source">
<pre>
<span class="ruby-comment cmt"># File lib/storage/cache.rb, line 47</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
    <span class="ruby-ivar">@stats</span>.<span class="ruby-identifier">each</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>
  <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000039" class="method-detail">
        <a name="M000039"></a>

        <div class="method-heading">
          <a href="#M000039" class="method-signature">
          <span class="method-name">inc</span><span class="method-args">(k)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000039-source">
<pre>
<span class="ruby-comment cmt"># File lib/storage/cache.rb, line 42</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inc</span>(<span class="ruby-identifier">k</span>)
    <span class="ruby-ivar">@stats</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
    <span class="ruby-ivar">@stats</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
  <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>