Subversion Repositories Applications.framework

Rev

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

Rev 419 Rev 431
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 419 2012-09-06 13:24:12Z aurelien $
19
 * @version	$Id: CacheSimple.php 431 2013-08-23 13:45:13Z raphael $
20
 * @link		/doc/framework/
20
 * @link		/doc/framework/
21
 */
21
 */
22
class CacheSimple {
22
class CacheSimple {
Line 23... Line 23...
23
	
23
	
Line 35... Line 35...
35
		extract($options);
35
		extract($options);
36
		$this->mise_en_cache = is_bool($mise_en_cache) ? $mise_en_cache : true;
36
		$this->mise_en_cache = is_bool($mise_en_cache) ? $mise_en_cache : true;
Line 37... Line 37...
37
		
37
		
38
		if ($this->mise_en_cache) {
38
		if ($this->mise_en_cache) {
-
 
39
			$this->stockage_chemin = isset($stockage_chemin) ? realpath($stockage_chemin) : Fichier::getDossierTmp();
-
 
40
			if(!realpath($stockage_chemin)) {
-
 
41
				error_log(sprintf("%s: Attention, realpath(%s) invalide [%s]",
-
 
42
								  __FILE__,
-
 
43
								  $stockage_chemin,
-
 
44
								  $_SERVER['REQUEST_URI']));
39
			$this->stockage_chemin = isset($stockage_chemin) ? realpath($stockage_chemin) : Fichier::getDossierTmp();
45
			}
40
			$this->duree_de_vie = isset($duree_de_vie) ? $duree_de_vie : 3600*24;
46
			$this->duree_de_vie = isset($duree_de_vie) ? $duree_de_vie : 3600*24;
41
		}
47
		}
Line 42... Line 48...
42
	}
48
	}