Пример #1
0
 /**
  * 删除指定的offset的缓存(如果有)
  *
  * 如果有ORM cache的设置,会自动调用$this->delete_orm_cache()方法
  *
  * @param string $index
  * @return boolean
  */
 public function delete_offset_cache($index)
 {
     # 获取配置
     $config = $this->_get_offset_config($index);
     # 不存在指定的配置
     if (!$config) {
         return false;
     }
     # 如果有ORM cache,则清楚ORM cache
     if (isset($config['orm']['cache'])) {
         $this->delete_orm_cache($index);
     }
     # 无缓存设置
     if (!isset($config['cache'])) {
         return true;
     }
     return OOP_ORM_Parse::delete_offset_cache_data($this, $index, $config['cache']);
 }