示例#1
0
 public static function get($dma_name)
 {
     $dma_code = self::getDmaCode($dma_name);
     if (empty($dma_code)) {
         return [];
     }
     self::setDmaCache($dma_code);
     $cache_key = self::getDmaCacheKey($dma_code);
     $ad_key = Redis::srandmember($cache_key);
     if (empty($ad_key)) {
         return [];
     } else {
         self::checkCache($ad_key);
         return Redis::hgetall($ad_key);
     }
 }