get($id); $info = array( 'pv_num' => $data['pv_num'] + 1 ); return $this->modify($info,array('id' => $id)); } /** * 添加默认渠道用cache 计数 */ public function addDefaultEventOnePV($schemeDomain,$events_id,$platform_id){ $key = $schemeDomain.'_'.$events_id.'_'.$platform_id; $objMemcached = new Memcached(); $num = $objMemcached->get($key); $time = time(); if($num){ if (strstr($num, '||')) { $temp = explode('||', $num); $num = $temp[0]; $num = $num + 1; } else { $num = $num + 1; } $value = $num . '||' . $time; $objMemcached->set($key,$value); }else{ $objMemcached->set($key,1 . '||' . $time); } } /** * 获取默认渠道用cache 计数 */ public function getDefaultEventOnePV($schemeDomain,$events_id,$platform_id){ $key = $schemeDomain.'_'.$events_id.'_'.$platform_id; $objMemcached = new Memcached(); return $objMemcached->get($key); } }