/**
  * เคลียร์แคช
  */
 public function clearCache()
 {
     if (self::$request->initSession() && self::$request->isReferer() && Login::isAdmin()) {
         $cahce = new Cache();
         if ($cahce->clear()) {
             $ret = array('alert' => Language::get('Cache cleared successfully'));
         } else {
             $ret = array('alert' => Language::get('Some files cannot be deleted'));
         }
         // คืนค่าเป็น JSON
         echo json_encode($ret);
     }
 }
Beispiel #2
0
 /**
  * เคลียร์แคช
  *
  * @return boolean true ถ้าลบเรียบร้อย, หรือ array ของรายการที่ไม่สำเร็จ
  */
 public function clear()
 {
     $this->db_cache->clear();
 }