Subversion Repositories Applications.framework

Rev

Rev 436 | Rev 441 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 436 Rev 437
Line 14... Line 14...
14
 * @author		Aurélien PERONNET <aurelien@tela-botanica.org>
14
 * @author		Aurélien PERONNET <aurelien@tela-botanica.org>
15
 * @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
15
 * @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
16
 * @license	http://framework.zend.com/license/new-bsd Licence New BSD
16
 * @license	http://framework.zend.com/license/new-bsd Licence New BSD
17
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
17
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
18
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
18
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
19
 * @version	$Id: CacheSimple.php 436 2013-09-17 14:27:57Z raphael $
19
 * @version	$Id: CacheSimple.php 437 2013-09-17 15:05:25Z raphael $
20
 * @link		/doc/framework/
20
 * @link		/doc/framework/
21
 */
21
 */
22
// TODO : voir ce qui est le plus pratique : error_log ou le gestionnaire de bogue du framework
22
// TODO : voir ce qui est le plus pratique : error_log ou le gestionnaire de bogue du framework
23
class CacheSimple {
23
class CacheSimple {
Line 32... Line 32...
32
		'duree_de_vie' => '3600*24'
32
		'duree_de_vie' => '3600*24'
33
	);
33
	);
Line 34... Line 34...
34
 
34
 
35
	public function __construct($options = array()) {
35
	public function __construct($options = array()) {
36
		extract($options);
36
		extract($options);
Line 37... Line 37...
37
		$this->mise_en_cache = is_bool($mise_en_cache) ? $mise_en_cache : true;
37
		$this->mise_en_cache = is_bool($mise_en_cache) ? $mise_en_cache : $mise_en_cache == '' ? false : true;
38
 
38
 
39
		if ($this->mise_en_cache) {
39
		if ($this->mise_en_cache) {
40
			$this->stockage_chemin = isset($stockage_chemin) ? realpath($stockage_chemin) : Fichier::getDossierTmp();
40
			$this->stockage_chemin = isset($stockage_chemin) ? realpath($stockage_chemin) : Fichier::getDossierTmp();