2015-04-07 21:31:40 +02:00

369 lines
6.1 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Luadocs for utils/blockedcache.lua</title>
<link rel="stylesheet" href="../../luadoc.css" type="text/css" />
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<div id="navigation">
<h1>LuaDoc</h1>
<ul>
<li><a href="../../index.html">Index</a></li>
</ul>
<!-- Module list -->
<!-- File list -->
<h1>Files</h1>
<ul>
<li><strong>utils/blockedcache.lua</strong></li>
<li>
<a href="../../files/utils/blockutil.html">utils/blockutil.lua</a>
</li>
<li>
<a href="../../files/utils/color.html">utils/color.lua</a>
</li>
<li>
<a href="../../files/utils/constants.html">utils/constants.lua</a>
</li>
<li>
<a href="../../files/utils/fisheryates.html">utils/fisheryates.lua</a>
</li>
<li>
<a href="../../files/utils/init.html">utils/init.lua</a>
</li>
<li>
<a href="../../files/utils/interpolate.html">utils/interpolate.lua</a>
</li>
<li>
<a href="../../files/utils/list.html">utils/list.lua</a>
</li>
<li>
<a href="../../files/utils/log.html">utils/log.lua</a>
</li>
<li>
<a href="../../files/utils/mapmanipulator.html">utils/mapmanipulator.lua</a>
</li>
<li>
<a href="../../files/utils/mathutil.html">utils/mathutil.lua</a>
</li>
<li>
<a href="../../files/utils/noisemanager.html">utils/noisemanager.lua</a>
</li>
<li>
<a href="../../files/utils/pathutil.html">utils/pathutil.lua</a>
</li>
<li>
<a href="../../files/utils/stopwatch.html">utils/stopwatch.lua</a>
</li>
<li>
<a href="../../files/utils/stringutil.html">utils/stringutil.lua</a>
</li>
<li>
<a href="../../files/utils/tableutil.html">utils/tableutil.lua</a>
</li>
<li>
<a href="../../files/utils/tango.html">utils/tango.lua</a>
</li>
<li>
<a href="../../files/utils/test.html">utils/test.lua</a>
</li>
<li>
<a href="../../files/utils/textureutil.html">utils/textureutil.lua</a>
</li>
<li>
<a href="../../files/utils/transform.html">utils/transform.lua</a>
</li>
</ul>
</div> <!-- id="navigation" -->
<div id="content">
<h1>File <code>utils/blockedcache.lua</code></h1>
<h2>Functions</h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#BlockedCache:clear">BlockedCache:clear</a>&nbsp;()</td>
<td class="summary">Clears the complete cache.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#BlockedCache:compact">BlockedCache:compact</a>&nbsp;(max_entries)</td>
<td class="summary">Compacts the cache, meaning it removes the oldest entries up to the maximum number of entries.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#BlockedCache:get">BlockedCache:get</a>&nbsp;(x, z)</td>
<td class="summary">Gets the value associated with the given x and z coordinates.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#BlockedCache:is_cached">BlockedCache:is_cached</a>&nbsp;(x, z)</td>
<td class="summary">Gets if there is a cache entry associated with the given x and z coordinates.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#BlockedCache:new">BlockedCache:new</a>&nbsp;(max_entries, auto_compact)</td>
<td class="summary">Creates a new instance of BlockedCache.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#BlockedCache:to_string">BlockedCache:to_string</a>&nbsp;()</td>
<td class="summary">Gets a string representation of this cache.</td>
</tr>
</table>
<br/>
<br/>
<h2><a name="functions"></a>Functions</h2>
<dl class="function">
<dt><a name="BlockedCache:clear"></a><strong>BlockedCache:clear</strong>&nbsp;()</dt>
<dd>
Clears the complete cache.
</dd>
<dt><a name="BlockedCache:compact"></a><strong>BlockedCache:compact</strong>&nbsp;(max_entries)</dt>
<dd>
Compacts the cache, meaning it removes the oldest entries up to the maximum number of entries.
<h3>Parameters</h3>
<ul>
<li>
max_entries: Optional. The maximum number of cache entries to preserve.
</li>
</ul>
</dd>
<dt><a name="BlockedCache:get"></a><strong>BlockedCache:get</strong>&nbsp;(x, z)</dt>
<dd>
Gets the value associated with the given x and z coordinates.
<h3>Parameters</h3>
<ul>
<li>
x: The x coordinate.
</li>
<li>
z: The z coordinate.
</li>
</ul>
<h3>Return value:</h3>
The value associated with the given x and z coordinates. Returns nil if there is no entry.
</dd>
<dt><a name="BlockedCache:is_cached"></a><strong>BlockedCache:is_cached</strong>&nbsp;(x, z)</dt>
<dd>
Gets if there is a cache entry associated with the given x and z coordinates.
<h3>Parameters</h3>
<ul>
<li>
x: The x coordinate.
</li>
<li>
z: The z coordinate.
</li>
</ul>
<h3>Return value:</h3>
true if there is an entry for the given coordinates.
</dd>
<dt><a name="BlockedCache:new"></a><strong>BlockedCache:new</strong>&nbsp;(max_entries, auto_compact)</dt>
<dd>
Creates a new instance of BlockedCache.
<h3>Parameters</h3>
<ul>
<li>
max_entries: Optional. The maximum entries for the cache which will be preserved if the cache is compacted, defaults to 12.
</li>
<li>
auto_compact: Optional. If the cache performs automatic compaction if the maximum numbers of entries is reached, defaults to true.
</li>
</ul>
<h3>Return value:</h3>
A new instance of BlockedCache.
</dd>
<dt><a name="BlockedCache:to_string"></a><strong>BlockedCache:to_string</strong>&nbsp;()</dt>
<dd>
Gets a string representation of this cache.
<h3>Return value:</h3>
The string representation.
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>