<?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">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class CalendarSolution_Cache_Memcache</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class CalendarSolution_Cache_Memcache</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<p class="implements">
Implements interfaces:
<ul>
<li><a href="../CalendarSolution/CalendarSolution_Cache.html">CalendarSolution_Cache</a></li> </ul>
</p>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calendar Solution's memcache methods</p>
<p class="description"><p>NOTE: the cache is flushed when administrators edit events.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Daniel Convissor <<a href="mailto:hide@address.com">hide@address.com</a>></li>
<li><span class="field">copyright:</span> The Analysis and Solutions Company, 2002-2012</li>
<li><span class="field">license:</span> <a href="http://www.analysisandsolutions.com/software/license.htm">Simple Public License</a></li>
</ul>
<p class="notes">
Located in <a class="field" href="_include---CalendarSolution---Cache---Memcache.php.html">/include/CalendarSolution/Cache/Memcache.php</a> (line <span class="field">22</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Variable Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="var-summary">
<div class="var-title">
<span class="var-type">Memcache</span>
<a href="#$cache" title="details" class="var-name">$cache</a>
</div>
<div class="var-title">
<span class="var-type">int</span>
<a href="#$expiration_time" title="details" class="var-name">$expiration_time</a>
</div>
</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">CalendarSolution_Cache_Memcache</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
()
</div>
<div class="method-definition">
<span class="method-result">bool</span>
<a href="#flush" title="details" class="method-name">flush</a>
()
</div>
<div class="method-definition">
<span class="method-result">mixed</span>
<a href="#get" title="details" class="method-name">get</a>
(<span class="var-type">string</span> <span class="var-name">$key</span>)
</div>
<div class="method-definition">
<span class="method-result">bool</span>
<a href="#set" title="details" class="method-name">set</a>
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>)
</div>
</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Variables</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<a name="var$cache" id="$cache"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">Memcache</span>
<span class="var-name">$cache</span>
(line <span class="line-number">27</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The cache connection</p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
</ul>
</div>
<a name="var$expiration_time" id="$expiration_time"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">int</span>
<span class="var-name">$expiration_time</span>
(line <span class="line-number">40</span>)
</span>
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The Unix timestamp of when the cache should expire.</p>
<p class="description"><p>Should be set to <kbd>00:00:01</kbd> tomorrow. This is because many views use the current date as the starting point, so when tomorrow rolls around, today's data is no longer needed.</p><p>NOTE: the cache is also flushed when administrators edit events.</p></p>
<ul class="tags">
<li><span class="field">access:</span> protected</li>
<li><span class="field">usedby:</span> <a href="../CalendarSolution/CalendarSolution_Cache_Memcache.html#methodset">CalendarSolution_Cache_Memcache::set()</a> - to know
when the data should exipre</li>
</ul>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">51</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calls memcache's addServer() for each server listed in $GLOBALS['cache_servers']</p>
<ul class="tags">
<li><span class="field">throws:</span> CalendarSolution_Exception if the memcache extension is not installed or if adding one of the cache servers fails</li>
<li><span class="field">access:</span> public</li>
<li><span class="field">uses:</span> $GLOBALS['cache_servers'] - to know where the cache servers are</li>
</ul>
<div class="method-signature">
<span class="method-result">CalendarSolution_Cache_Memcache</span>
<span class="method-name">
__construct
</span>
()
</div>
</div>
<a name="methodflush" id="flush"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">flush</span> (line <span class="line-number">73</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Flush all data from the cache</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">bool</span>
<span class="method-name">
flush
</span>
()
</div>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../CalendarSolution/CalendarSolution_Cache.html#methodflush">CalendarSolution_Cache::flush()</a></dt>
<dd>Flush all data from the cache</dd>
</dl>
</div>
<a name="methodget" id="get"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">get</span> (line <span class="line-number">84</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Obtains data from the cache</p>
<ul class="tags">
<li><span class="field">return:</span> the data on success, false on failure</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">mixed</span>
<span class="method-name">
get
</span>
(<span class="var-type">string</span> <span class="var-name">$key</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$key</span><span class="var-description">: the data element's name</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../CalendarSolution/CalendarSolution_Cache.html#methodget">CalendarSolution_Cache::get()</a></dt>
<dd>Obtains data from the cache</dd>
</dl>
</div>
<a name="methodset" id="set"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">set</span> (line <span class="line-number">102</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Stores data in the cache</p>
<p class="description"><p>If $expiration_time has not been set, this method sets it to <kbd>00:00:01</kbd> tomorrow.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
<li><span class="field">uses:</span> <a href="../CalendarSolution/CalendarSolution_Cache_Memcache.html#var$expiration_time">CalendarSolution_Cache_Memcache::$expiration_time</a> - to know
when the data should exipre</li>
</ul>
<div class="method-signature">
<span class="method-result">bool</span>
<span class="method-name">
set
</span>
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>)
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$key</span><span class="var-description">: the data element's name</span> </li>
<li>
<span class="var-type">mixed</span>
<span class="var-name">$value</span><span class="var-description">: the data to be stored</span> </li>
</ul>
<hr class="separator" />
<div class="notes">Implementation of:</div>
<dl>
<dt><a href="../CalendarSolution/CalendarSolution_Cache.html#methodset">CalendarSolution_Cache::set()</a></dt>
<dd>Stores data in the cache</dd>
</dl>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Wed, 21 Mar 2012 14:16:44 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
</p>
</div></body>
</html>