tmud-2.9.0/benchmark/
tmud-2.9.0/cmd/
tmud-2.9.0/cmd/objects/
tmud-2.9.0/cmd/tiny/
tmud-2.9.0/db/
tmud-2.9.0/doc/classes/Acceptor.src/
tmud-2.9.0/doc/classes/BoolExpParser.src/
tmud-2.9.0/doc/classes/CacheStats.src/
tmud-2.9.0/doc/classes/Character.src/
tmud-2.9.0/doc/classes/Client.src/
tmud-2.9.0/doc/classes/ColorFilter.src/
tmud-2.9.0/doc/classes/Command.src/
tmud-2.9.0/doc/classes/Configuration.src/
tmud-2.9.0/doc/classes/Connector.src/
tmud-2.9.0/doc/classes/ConsoleClient.src/
tmud-2.9.0/doc/classes/CursesClient.src/
tmud-2.9.0/doc/classes/DebugFilter.src/
tmud-2.9.0/doc/classes/Dumper.src/
tmud-2.9.0/doc/classes/Engine.src/
tmud-2.9.0/doc/classes/Event.src/
tmud-2.9.0/doc/classes/EventManager.src/
tmud-2.9.0/doc/classes/Farts/AttributeSyntaxNode.src/
tmud-2.9.0/doc/classes/Farts/CallSyntaxNode.src/
tmud-2.9.0/doc/classes/Farts/CommandSyntaxNode.src/
tmud-2.9.0/doc/classes/Farts/CommentSyntaxNode.src/
tmud-2.9.0/doc/classes/Farts/EndSyntaxNode.src/
tmud-2.9.0/doc/classes/Farts/IfSyntaxNode.src/
tmud-2.9.0/doc/classes/Farts/Interpreter.src/
tmud-2.9.0/doc/classes/Farts/Lexer.src/
tmud-2.9.0/doc/classes/Farts/Lib.src/
tmud-2.9.0/doc/classes/Farts/LiteralSyntaxNode.src/
tmud-2.9.0/doc/classes/Farts/LocalVarSyntaxNode.src/
tmud-2.9.0/doc/classes/Farts/Parser.src/
tmud-2.9.0/doc/classes/Farts/ProgramSyntaxNode.src/
tmud-2.9.0/doc/classes/Farts/SyntaxNode.src/
tmud-2.9.0/doc/classes/Filter.src/
tmud-2.9.0/doc/classes/LineIO.src/
tmud-2.9.0/doc/classes/Loader.src/
tmud-2.9.0/doc/classes/Log.src/
tmud-2.9.0/doc/classes/Module.src/
tmud-2.9.0/doc/classes/ObjCmd.src/
tmud-2.9.0/doc/classes/PacketIO.src/
tmud-2.9.0/doc/classes/ProtocolStack.src/
tmud-2.9.0/doc/classes/Publisher.src/
tmud-2.9.0/doc/classes/Reactor.src/
tmud-2.9.0/doc/classes/Room.src/
tmud-2.9.0/doc/classes/SQLite/
tmud-2.9.0/doc/classes/SQLite/Database.src/
tmud-2.9.0/doc/classes/SQLite3/
tmud-2.9.0/doc/classes/SQLite3/Database.src/
tmud-2.9.0/doc/classes/Script.src/
tmud-2.9.0/doc/classes/SockIO.src/
tmud-2.9.0/doc/classes/String.src/
tmud-2.9.0/doc/classes/TerminalFilter.src/
tmud-2.9.0/doc/classes/TernaryTrie.src/
tmud-2.9.0/doc/classes/TernaryTrie/
tmud-2.9.0/doc/classes/TernaryTrie/TNode.src/
tmud-2.9.0/doc/classes/Timer.src/
tmud-2.9.0/doc/classes/Utility.src/
tmud-2.9.0/doc/classes/XmlStore.src/
tmud-2.9.0/doc/classes/YamlStore.src/
tmud-2.9.0/doc/dot/
tmud-2.9.0/doc/files/cmd/objects/
tmud-2.9.0/doc/files/cmd/tiny/
tmud-2.9.0/doc/files/lib/
tmud-2.9.0/doc/files/lib/engine/
tmud-2.9.0/doc/files/lib/farts/
tmud-2.9.0/doc/files/tclient_rb.src/
tmud-2.9.0/doc/files/tmud_rb.src/
tmud-2.9.0/farts/
tmud-2.9.0/lib/
tmud-2.9.0/lib/core/
tmud-2.9.0/lib/engine/
tmud-2.9.0/lib/farts/
tmud-2.9.0/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: CacheManager</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">CacheManager</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="7,17,92,65"      href="CacheStats.html" alt="CacheStats
">
  <area shape="RECT" coords="116,17,217,65"      href="CacheManager.html" alt="CacheManager
">
  <area shape="RECT" coords="241,17,327,65"      href="CacheEntry.html" alt="CacheEntry
">
</map>
<img src="../dot/f_41.png" usemap="#map" border=0 alt="TopLevel">
    </div>

    <div id="description">
      <p>
This class manages the cache. It is initialized by the <a
href="Store.html">Store</a> and front ends the database behind the <a
href="Store.html">Store</a>.
</p>

    </div>


   </div>

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

      <div class="name-list">
      <a href="#M000113">delete</a>&nbsp;&nbsp;
      <a href="#M000111">get</a>&nbsp;&nbsp;
      <a href="#M000110">hash</a>&nbsp;&nbsp;
      <a href="#M000109">inspect</a>&nbsp;&nbsp;
      <a href="#M000119">keys</a>&nbsp;&nbsp;
      <a href="#M000117">makenoswap</a>&nbsp;&nbsp;
      <a href="#M000118">makeswap</a>&nbsp;&nbsp;
      <a href="#M000114">mark</a>&nbsp;&nbsp;
      <a href="#M000108">new</a>&nbsp;&nbsp;
      <a href="#M000112">put</a>&nbsp;&nbsp;
      <a href="#M000120">stats</a>&nbsp;&nbsp;
      <a href="#M000115">sync</a>&nbsp;&nbsp;
      <a href="#M000116">sync_chain</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-M000108" class="method-detail">
        <a name="M000108"></a>

        <div class="method-heading">
          <a href="CacheManager.src/M000108.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000108.html');return false;">
          <span class="method-name">new</span><span class="method-args">(db)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

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

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

        <div class="method-heading">
          <a href="CacheManager.src/M000113.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000113.html');return false;">
          <span class="method-name">delete</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
delete an object
</p>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000111.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000111.html');return false;">
          <span class="method-name">get</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
gets an object
</p>
<dl>
<dt><tt>oid</tt></dt><dd>- integer object id to retrieve

</dd>
<dt><tt>return</tt></dt><dd>- a reference to the object or nil if none exists

</dd>
</dl>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000110.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000110.html');return false;">
          <span class="method-name">hash</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Our simple hash algoritm. Our database keys are sequentially assigned
integers, so&#8230; I don&#8217;t know what would be better.
</p>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000109.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000109.html');return false;">
          <span class="method-name">inspect</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
report on the cache map see cmd_dumpcache
</p>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000119.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000119.html');return false;">
          <span class="method-name">keys</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This is provided to traverse the entire object chain. This thrashes the
cache violently. See <a href="Store.html#M000026">Store#each</a>. One needs
to question the design of routines that use <a
href="Store.html#M000026">Store#each</a> above.
</p>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000117.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000117.html');return false;">
          <span class="method-name">makenoswap</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Mark an object in the cache as nonswappable
</p>
<dl>
<dt><tt>oid</tt></dt><dd>is the object id

</dd>
<dt><tt>return</tt></dt><dd>undefined

</dd>
</dl>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000118.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000118.html');return false;">
          <span class="method-name">makeswap</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Mark an object in the cache as swappable
</p>
<dl>
<dt><tt>oid</tt></dt><dd>is the object id

</dd>
<dt><tt>return</tt></dt><dd>undefined

</dd>
</dl>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000114.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000114.html');return false;">
          <span class="method-name">mark</span><span class="method-args">(oid)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
deliberately mark an object in the cache as dirty see properties.
</p>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000112.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000112.html');return false;">
          <span class="method-name">put</span><span class="method-args">(obj)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
puts an object
</p>
<dl>
<dt><tt>obj</tt></dt><dd>- The integer object id to retrieve

</dd>
<dt><tt>return</tt></dt><dd>- undefined

</dd>
</dl>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000120.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000120.html');return false;">
          <span class="method-name">stats</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
produce a report - see cmd_stats
</p>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000115.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000115.html');return false;">
          <span class="method-name">sync</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
syncronize the entire cache with the database called by save.
</p>
        </div>
      </div>

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

        <div class="method-heading">
          <a href="CacheManager.src/M000116.html" target="Code" class="method-signature"
            onclick="popupCode('CacheManager.src/M000116.html');return false;">
          <span class="method-name">sync_chain</span><span class="method-args">(i)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
syncronize a specific list chain not yet called but included for possible
performance enhancement
</p>
        </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>