Ejemplo n.º 1
0
 public function one_by_icode($icode, $is_force = false)
 {
     $cache_key = $this->CACHE_PREFIX . $this->table_name . '*' . $icode;
     if (!$is_force) {
         $row = FwCache::get_value($cache_key);
     }
     if ($is_force || is_null($row)) {
         $row = db_row($this->table_name, array('icode' => $icode));
         FwCache::set_value($cache_key, $row);
     }
     return $row;
 }
Ejemplo n.º 2
0
 /**
  * clears whole cache
  * @return nothing
  */
 public static function clear()
 {
     self::$storage = array();
 }
Ejemplo n.º 3
0
 public function cache_remove($id)
 {
     $cache_key = $this->CACHE_PREFIX . $this->table_name . '*' . $id;
     FwCache::remove($cache_key);
 }