Example #1
0
 /**
  * create our object.  where and how long to store it.
  *
  * @param $table - the name of the table in the database to store the cache.
  */
 public function __construct($table = "easy_cache")
 {
     parent::__construct();
     $this->table = $table;
 }
Example #2
0
 /**
  * create our object.  where and how long to store it.
  *
  * @param $path string the path to store the object.  the hash of the data name
  * will be appended directly after this.
  */
 public function __construct($path = "/tmp/EasyCache/")
 {
     parent::__construct();
     $this->path = $path;
     //make sure our cache directory exists.
     if (!is_dir($this->path)) {
         mkdir($this->path, 0777, true);
     }
 }