You are here

function pCache::pCache in Visitors 7.2

Same name and namespace in other branches
  1. 8 pchart/pCache.inc \pCache::pCache()
  2. 7 pChart/class/pCache.class.php \pCache::pCache()
  3. 7.0 pchart/pCache.inc \pCache::pCache()

File

pChart/class/pCache.class.php, line 24

Class

pCache

Code

function pCache($Settings = "") {
  $CacheFolder = isset($Settings["CacheFolder"]) ? $Settings["CacheFolder"] : "cache";
  $CacheIndex = isset($Settings["CacheIndex"]) ? $Settings["CacheIndex"] : "index.db";
  $CacheDB = isset($Settings["CacheDB"]) ? $Settings["CacheDB"] : "cache.db";
  $this->CacheFolder = $CacheFolder;
  $this->CacheIndex = $CacheIndex;
  $this->CacheDB = $CacheDB;
  if (!file_exists($this->CacheFolder . "/" . $this->CacheIndex)) {
    touch($this->CacheFolder . "/" . $this->CacheIndex);
  }
  if (!file_exists($this->CacheFolder . "/" . $this->CacheDB)) {
    touch($this->CacheFolder . "/" . $this->CacheDB);
  }
}