コード例 #1
0
 public static function get_community_latlng_baidu($commid)
 {
     return MemCacheHelper::get_key(Const_MemCache::KEY_COMMUNITY_LAT_LNG_BAIDU, $commid);
 }
コード例 #2
0
ファイル: Agent.php プロジェクト: emilymwang8/ajk-broker
 public function getAgentBrokerType($cityid = '')
 {
     APF::get_instance()->benchmark_begin(__CLASS__ . " getAgentBrokerType ");
     $mem = APF_Cache_Factory::get_instance()->get_memcache();
     $key = MemCacheHelper::get_key(__CLASS__ . "::" . __FUNCTION__ . '_' . $cityid);
     $brokerType = $mem->get($key);
     if (!$brokerType) {
         $pdo = APF_DB_Factory::get_instance()->get_pdo("anjuke_master");
         if ($cityid > 0) {
             $where = "where CityId = {$cityid}";
         }
         $sql = "select TypeId,TypeName from ajk_vipbrokertype {$where}";
         $stmt = $pdo->prepare($sql);
         $stmt->execute();
         $brokerType = $stmt->fetchAll();
         $mem->set($key, $brokerType, 0, 86400);
     }
     APF::get_instance()->benchmark_end(__CLASS__ . " getAgentBrokerType ");
     return $brokerType;
 }