8 require_once(CH_DIRECTORY_PATH_CLASSES .
'ChWsbCacheFile.php');
17 parent::__construct();
29 if(!file_exists($this->sPath . $sKey))
32 if ($iTTL > 0 && $this->_removeFileIfTtlExpired ($this->sPath . $sKey, $iTTL))
35 return file_get_contents($this->sPath . $sKey);
43 if (!file_exists($this->sPath . $sKey))
46 if ($iTTL > 0 && $this->_removeFileIfTtlExpired ($this->sPath . $sKey, $iTTL))
49 return $this->sPath . $sKey;
60 function setData($sKey, $mixedData, $iTTL =
false)
62 if(file_exists($this->sPath . $sKey) && !is_writable($this->sPath . $sKey))
65 if(!($rHandler = fopen($this->sPath . $sKey,
'w')))
68 fwrite($rHandler, $mixedData);
70 @chmod($this->sPath . $sKey, 0666);