New file |
0,0 → 1,883 |
<!DOCTYPE html> |
<html> |
<head> |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
<meta name="generator" content="ApiGen 2.8.0"> |
|
<title>Class CacheSqlite | TBFramework - v0.3</title> |
|
<script type="text/javascript" src="resources/combined.js?4205936287"></script> |
<script type="text/javascript" src="elementlist.js?4111837732"></script> |
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360"> |
|
</head> |
|
<body> |
<div id="left"> |
<div id="menu"> |
<a href="index.html" title="Overview"><span>Overview</span></a> |
|
|
<div id="groups"> |
<h3>Packages</h3> |
<ul> |
<li><a href="package-Framework.html">Framework</a> |
</li> |
<li class="active"><a href="package-None.html">None</a> |
</li> |
<li><a href="package-PHP.html">PHP</a> |
</li> |
<li><a href="package-Utilitaire.html">Utilitaire</a> |
</li> |
</ul> |
</div> |
|
<hr> |
|
|
<div id="elements"> |
<h3>Classes</h3> |
<ul> |
<li><a href="class-CacheFichier.html">CacheFichier</a></li> |
<li class="active"><a href="class-CacheSqlite.html">CacheSqlite</a></li> |
</ul> |
|
|
|
|
|
</div> |
</div> |
</div> |
|
<div id="splitter"></div> |
|
<div id="right"> |
<div id="rightInner"> |
<form id="search"> |
<input type="hidden" name="cx" value=""> |
<input type="hidden" name="ie" value="UTF-8"> |
<input type="text" name="q" class="text"> |
<input type="submit" value="Search"> |
</form> |
|
<div id="navigation"> |
<ul> |
<li> |
<a href="index.html" title="Overview"><span>Overview</span></a> |
</li> |
<li> |
<a href="package-None.html" title="Summary of None"><span>Package</span></a> |
</li> |
<li class="active"> |
<span>Class</span> </li> |
</ul> |
<ul> |
<li> |
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a> |
</li> |
<li> |
<a href="deprecated.html" title="List of deprecated elements"><span>Deprecated</span></a> |
</li> |
<li> |
<a href="todo.html" title="Todo list"><span>Todo</span></a> |
</li> |
</ul> |
<ul> |
</ul> |
</div> |
|
<div id="content" class="class"> |
<h1>Class CacheSqlite</h1> |
|
|
|
|
|
|
|
|
|
|
|
<div class="info"> |
|
|
|
|
|
<b>Located at</b> <a href="source-class-CacheSqlite.html#2-616" title="Go to source code">CacheSqlite.php</a><br> |
</div> |
|
|
|
<table class="summary" id="methods"> |
<caption>Methods summary</caption> |
<tr data-order="__construct" id="___construct"> |
|
<td class="attributes"><code> |
public |
|
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#___construct">#</a> |
<code><a href="source-class-CacheSqlite.html#41-57" title="Go to source code">__construct</a>( <span>array <var>$options</var> = <span class="php-keyword1">array</span>()</span>, <span><code><a href="class-Cache.html">Cache</a></code> <var>$cache</var></span> )</code> |
|
<div class="description short"> |
|
<p>Constructor</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Constructor</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$options</var></dt> |
<dd><code>array</code><br>$options Associative array of options</dd> |
<dt><var>$cache</var></dt> |
<dd></dd> |
</dl></div> |
|
|
<h4>Throws</h4> |
<div class="list"> |
<code>Zend_cache_Exception</code><br> |
</div> |
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="__destruct" id="___destruct"> |
|
<td class="attributes"><code> |
public |
|
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#___destruct">#</a> |
<code><a href="source-class-CacheSqlite.html#67-74" title="Go to source code">__destruct</a>( )</code> |
|
<div class="description short"> |
|
<p>Destructor</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Destructor</p> |
|
|
|
|
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="setEmplacement" id="_setEmplacement"> |
|
<td class="attributes"><code> |
public |
|
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_setEmplacement">#</a> |
<code><a href="source-class-CacheSqlite.html#88-95" title="Go to source code">setEmplacement</a>( <span>mixed <var>$emplacement</var></span> )</code> |
|
<div class="description short"> |
|
</div> |
|
<div class="description detailed hidden"> |
|
|
|
|
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="charger" id="_charger"> |
|
<td class="attributes"><code> |
public |
string|false |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_charger">#</a> |
<code><a href="source-class-CacheSqlite.html#97-111" title="Go to source code">charger</a>( <span>string <var>$id</var></span>, <span>boolean <var>$ne_pas_tester_validiter_du_cache</var> = <span class="php-keyword1">false</span></span> )</code> |
|
<div class="description short"> |
|
<p>Test if a cache is available for the given id and (if yes) return it (false |
else)</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Test if a cache is available for the given id and (if yes) return it (false |
else)</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$id</var></dt> |
<dd><code>string</code><br>$id Cache id</dd> |
<dt><var>$ne_pas_tester_validiter_du_cache</var></dt> |
<dd><code>boolean</code><br>$doNotTestCacheValidity If set to true, the cache validity won't be tested</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>string|false</code><br>Cached datas<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="tester" id="_tester"> |
|
<td class="attributes"><code> |
public |
mixed|false |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_tester">#</a> |
<code><a href="source-class-CacheSqlite.html#113-125" title="Go to source code">tester</a>( <span>string <var>$id</var></span> )</code> |
|
<div class="description short"> |
|
<p>Test if a cache is available or not (for the given id)</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Test if a cache is available or not (for the given id)</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$id</var></dt> |
<dd><code>string</code><br>$id Cache id</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>mixed|false</code><br>(a cache is not available) or "last modified" timestamp (int) of the available |
cache record<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="sauver" id="_sauver"> |
|
<td class="attributes"><code> |
public |
boolean |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_sauver">#</a> |
<code><a href="source-class-CacheSqlite.html#127-162" title="Go to source code">sauver</a>( <span>string <var>$donnees</var></span>, <span>string <var>$id</var></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span>, <span>integer <var>$duree_vie_specifique</var> = <span class="php-keyword1">false</span></span> )</code> |
|
<div class="description short"> |
|
<p>Save some string datas into a cache record</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Save some string datas into a cache record</p> |
|
<p>Note : $data is always "string" (serialization is done by the core not by the |
backend)</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$donnees</var></dt> |
<dd><code>string</code><br>$data Datas to cache</dd> |
<dt><var>$id</var></dt> |
<dd><code>string</code><br>$id Cache id</dd> |
<dt><var>$tags</var></dt> |
<dd><code>array</code><br>$tags Array of strings, the cache record will be tagged by each string entry</dd> |
<dt><var>$duree_vie_specifique</var></dt> |
<dd><code>integer</code><br>$specificLifetime If != false, set a specific lifetime for this cache record |
(null => infinite lifetime)</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>boolean</code><br>True if no problem<br> |
</div> |
|
<h4>Throws</h4> |
<div class="list"> |
<code>Zend_Cache_Exception</code><br> |
</div> |
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="supprimer" id="_supprimer"> |
|
<td class="attributes"><code> |
public |
boolean |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_supprimer">#</a> |
<code><a href="source-class-CacheSqlite.html#164-178" title="Go to source code">supprimer</a>( <span>string <var>$id</var></span> )</code> |
|
<div class="description short"> |
|
<p>Remove a cache record</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Remove a cache record</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$id</var></dt> |
<dd><code>string</code><br>$id Cache id</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>boolean</code><br>True if no problem<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="nettoyer" id="_nettoyer"> |
|
<td class="attributes"><code> |
public |
boolean |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_nettoyer">#</a> |
<code><a href="source-class-CacheSqlite.html#180-202" title="Go to source code">nettoyer</a>( <span>string <var>$mode</var> = <code><a href="class-Cache.html#NETTOYAGE_MODE_TOUS">Cache::<b>NETTOYAGE_MODE_TOUS</b></a></code></span>, <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code> |
|
<div class="description short"> |
|
<p>Clean some cache records</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Clean some cache records</p> |
|
<p>Available modes are : Zend_Cache::CLEANING_MODE_ALL (default) => remove |
all cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_OLD => remove |
too old cache entries ($tags is not used) Zend_Cache::CLEANING_MODE_MATCHING_TAG |
=> remove cache entries matching all given tags ($tags can be an array of |
strings or a single string) Zend_Cache::CLEANING_MODE_NOT_MATCHING_TAG => |
remove cache entries not {matching one of the given tags} ($tags can be an array |
of strings or a single string) Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG => |
remove cache entries matching any given tags ($tags can be an array of strings |
or a single string)</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$mode</var></dt> |
<dd><code>string</code><br>$mode Clean mode</dd> |
<dt><var>$tags</var></dt> |
<dd><code>array</code><br>$tags Array of tags</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>boolean</code><br>True if no problem<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="getIds" id="_getIds"> |
|
<td class="attributes"><code> |
public |
array |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_getIds">#</a> |
<code><a href="source-class-CacheSqlite.html#204-217" title="Go to source code">getIds</a>( )</code> |
|
<div class="description short"> |
|
<p>Return an array of stored cache ids</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Return an array of stored cache ids</p> |
|
|
|
|
<h4>Returns</h4> |
<div class="list"> |
<code>array</code><br>array of stored cache ids (string)<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="getTags" id="_getTags"> |
|
<td class="attributes"><code> |
public |
array |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_getTags">#</a> |
<code><a href="source-class-CacheSqlite.html#219-232" title="Go to source code">getTags</a>( )</code> |
|
<div class="description short"> |
|
<p>Return an array of stored tags</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Return an array of stored tags</p> |
|
|
|
|
<h4>Returns</h4> |
<div class="list"> |
<code>array</code><br>array of stored tags (string)<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="getIdsAvecLesTags" id="_getIdsAvecLesTags"> |
|
<td class="attributes"><code> |
public |
array |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_getIdsAvecLesTags">#</a> |
<code><a href="source-class-CacheSqlite.html#234-270" title="Go to source code">getIdsAvecLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code> |
|
<div class="description short"> |
|
<p>Return an array of stored cache ids which match given tags</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Return an array of stored cache ids which match given tags</p> |
|
<p>In case of multiple tags, a logical AND is made between tags</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$tags</var></dt> |
<dd><code>array</code><br>$tags array of tags</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>array</code><br>array of matching cache ids (string)<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="getIdsSansLesTags" id="_getIdsSansLesTags"> |
|
<td class="attributes"><code> |
public |
array |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_getIdsSansLesTags">#</a> |
<code><a href="source-class-CacheSqlite.html#272-302" title="Go to source code">getIdsSansLesTags</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code> |
|
<div class="description short"> |
|
<p>Return an array of stored cache ids which don't match given tags</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Return an array of stored cache ids which don't match given tags</p> |
|
<p>In case of multiple tags, a logical OR is made between tags</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$tags</var></dt> |
<dd><code>array</code><br>$tags array of tags</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>array</code><br>array of not matching cache ids (string)<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="getIdsAvecUnTag" id="_getIdsAvecUnTag"> |
|
<td class="attributes"><code> |
public |
array |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_getIdsAvecUnTag">#</a> |
<code><a href="source-class-CacheSqlite.html#304-340" title="Go to source code">getIdsAvecUnTag</a>( <span>array <var>$tags</var> = <span class="php-keyword1">array</span>()</span> )</code> |
|
<div class="description short"> |
|
<p>Return an array of stored cache ids which match any given tags</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Return an array of stored cache ids which match any given tags</p> |
|
<p>In case of multiple tags, a logical AND is made between tags</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$tags</var></dt> |
<dd><code>array</code><br>$tags array of tags</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>array</code><br>array of any matching cache ids (string)<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="getPourcentageRemplissage" id="_getPourcentageRemplissage"> |
|
<td class="attributes"><code> |
public |
integer |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_getPourcentageRemplissage">#</a> |
<code><a href="source-class-CacheSqlite.html#342-360" title="Go to source code">getPourcentageRemplissage</a>( )</code> |
|
<div class="description short"> |
|
<p>Return the filling percentage of the backend storage</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Return the filling percentage of the backend storage</p> |
|
|
|
|
<h4>Returns</h4> |
<div class="list"> |
<code>integer</code><br>integer between 0 and 100<br> |
</div> |
|
<h4>Throws</h4> |
<div class="list"> |
<code>Zend_Cache_Exception</code><br> |
</div> |
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="getMetadonnees" id="_getMetadonnees"> |
|
<td class="attributes"><code> |
public |
array |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_getMetadonnees">#</a> |
<code><a href="source-class-CacheSqlite.html#362-394" title="Go to source code">getMetadonnees</a>( <span>string <var>$id</var></span> )</code> |
|
<div class="description short"> |
|
<p>Return an array of metadatas for the given cache id</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Return an array of metadatas for the given cache id</p> |
|
<p>The array must include these keys :</p> |
|
<ul> |
<li>expire : the expire timestamp</li> |
|
<li>tags : a string array of tags</li> |
|
<li>mtime : timestamp of last modification time</li> |
</ul> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$id</var></dt> |
<dd><code>string</code><br>$id cache id</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>array</code><br>array of metadatas (false if the cache id is not found)<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
<tr data-order="ajouterSupplementDureeDeVie" id="_ajouterSupplementDureeDeVie"> |
|
<td class="attributes"><code> |
public |
boolean |
|
</code> |
</td> |
|
<td class="name"><div> |
<a class="anchor" href="#_ajouterSupplementDureeDeVie">#</a> |
<code><a href="source-class-CacheSqlite.html#396-415" title="Go to source code">ajouterSupplementDureeDeVie</a>( <span>string <var>$id</var></span>, <span>integer <var>$supplement_duree_de_vie</var></span> )</code> |
|
<div class="description short"> |
|
<p>Give (if possible) an extra lifetime to the given cache id</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Give (if possible) an extra lifetime to the given cache id</p> |
|
|
|
<h4>Parameters</h4> |
<div class="list"><dl> |
<dt><var>$id</var></dt> |
<dd><code>string</code><br>$id cache id</dd> |
<dt><var>$supplement_duree_de_vie</var></dt> |
<dd><code>integer</code><br>$extraLifetime</dd> |
</dl></div> |
|
<h4>Returns</h4> |
<div class="list"> |
<code>boolean</code><br>true if ok<br> |
</div> |
|
|
|
|
</div> |
</div></td> |
</tr> |
</table> |
|
|
|
|
|
|
|
|
|
|
|
|
<table class="summary" id="properties"> |
<caption>Properties summary</caption> |
<tr data-order="options" id="$options"> |
<td class="attributes"><code> |
protected |
array |
</code></td> |
|
<td class="name"> |
<a href="source-class-CacheSqlite.html#3-23" title="Go to source code"><var>$options</var></a> |
</td> |
<td class="value"><code><span class="php-keyword1">array</span>( |
<span class="php-quote">'stockage_chemin'</span> => <span class="php-keyword1">null</span>, |
<span class="php-quote">'defragmentation_auto'</span> => <span class="php-num">10</span> |
)</code></td> |
<td class="description"><div> |
<a href="#$options" class="anchor">#</a> |
|
<div class="description short"> |
|
<p>Options disponibles :</p> |
|
</div> |
|
<div class="description detailed hidden"> |
|
<p>Options disponibles :</p> |
|
<h1>> (string) stockage_chemin :</h1> |
|
<p>Chemin vers le fichier contenant la base SQLite.</p> |
|
<h1>> (int) defragmentation_auto :</h1> |
|
<ul> |
<li>Désactive / Régler le processus de défragmentation automatique</li> |
|
<li>Le processus de défragmentation automatiques réduit la taille du fichier |
contenant la base de données quand un ajout ou une suppression de cache est |
réalisée : 0 => pas de défragmentation automatique 1 => |
défragmentation automatique systématique x (integer) > 1 => |
défragmentation automatique toutes les 1 fois (au hasard) sur x ajout ou |
suppression de cache</li> |
</ul> |
|
|
</div> |
</div></td> |
</tr> |
</table> |
|
|
|
|
|
|
</div> |
|
<div id="footer"> |
TBFramework - v0.3 API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a> |
</div> |
</div> |
</div> |
</body> |
</html> |