Ejemplo n.º 1
0
 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');
             }
         }
     }
 }
Ejemplo n.º 2
0
 public function postUpdate($data = array())
 {
     $result = $this->data($data)->save();
     if ($result !== false) {
         memcache($this->memcached, 'Post', $data['pkid'], 'rm');
     }
     return $result;
 }