public function rmMemcacheForPost($id) { if ($id) { $data = M('Post')->field('pkid')->where(array('enterprise_id' => $id))->select(); if (!empty($data)) { foreach ($data as $value) { memcache($this->memcached, 'Post', $value['pkid'], 'rm'); } } } }
public function postUpdate($data = array()) { $result = $this->data($data)->save(); if ($result !== false) { memcache($this->memcached, 'Post', $data['pkid'], 'rm'); } return $result; }