function getContributeCityRank($cityid, $limit) { $key = 'get_contribute_city_Rank_cityid_' . $cityid . $limit; APF::get_instance()->benchmark_begin(__CLASS__ . $key); $memcache = APF_Cache_Factory::get_instance()->get_memcache(); $value = $memcache->get($key); if (!$value) { $value = parent::getContributeCityRank($cityid, $limit); $memcache->add($key, $value, 0, 21600); //6小时 } APF::get_instance()->benchmark_end(__CLASS__ . $key); return $value; }