Subversion Repositories eFlore/Applications.moissonnage

Rev

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

Rev 22 Rev 26
Line 2... Line 2...
2
class CacheMoissonnage {
2
class CacheMoissonnage {
Line 3... Line 3...
3
	
3
	
4
	private $service;
4
	private $service;
5
	private $config;
5
	private $config;
6
	private $dureecache = 0;
-
 
7
	private $projetNom;
6
	private $dureecache = 0;
8
	private $serviceNom;
7
	private $serviceNom;
9
	private $cache;
8
	private $cache;
Line 10... Line 9...
10
	private $cacheActif;
9
	private $cacheActif;
11
	
10
	
12
	public function __construct($service, $projetNom, $serviceNom, $cacheActif) {
11
	public function __construct($service, $serviceNom, $cacheActif) {
13
		$this->cacheActif = $cacheActif;
12
		$this->cacheActif = $cacheActif;
14
		$this->service = $service;
-
 
15
		$this->chargerDureeCache();
13
		$this->service = $service;
-
 
14
		$this->chargerDureeCache();
-
 
15
		$this->serviceNom = $serviceNom;
16
		$this->projetNom = $projetNom;
16
		$this->cache = new CacheSimple(array(
-
 
17
			"mise_en_cache"   => true,
-
 
18
			"stockage_chemin" => Config::get("chemincache"),
17
		$this->serviceNom = $serviceNom;
19
			"duree_de_vie"    => $this->dureecache
Line 18... Line 20...
18
		$this->cache = new CacheSimple(array("mise_en_cache" => true, "stockage_chemin" => Config::get("chemincache"), "duree_de_vie" => $this->dureecache));
20
		));
19
	}
21
	}
20
 
22
 
Line 57... Line 59...
57
			foreach ($parametres as $key => $val) {
59
			foreach ($parametres as $key => $val) {
58
				$chaineParametres .= "$key:$val;";
60
				$chaineParametres .= "$key:$val;";
59
			}
61
			}
60
		}
62
		}
Line 61... Line 63...
61
		
63
		
62
		$chaineMD5 = $this->projetNom.'/'.$this->serviceNom.'/'.md5($chaineRessources.$chaineParametres);
64
		$chaineMD5 = $this->serviceNom.'/'.md5($chaineRessources.$chaineParametres);
63
		return $chaineMD5;
65
		return $chaineMD5;
64
	}
66
	}