Exemplo n.º 1
0
 public static function deleteAdDetailsCache($job_id)
 {
     $sql = "SELECT a.id, a.dma_code\n\t\t\t   \t  FROM ad_jobs aj, ads a\n\t\t\t  \t WHERE aj.ad_id = a.id\n\t\t\t\t   AND aj.job_id = {$job_id}";
     $ads = DB::select($sql);
     foreach ($ads as $ad) {
         $cache_key = self::getAdDetailsCacheKey($ad->dma_code, $ad->id, $job_id);
         Redis::del($cache_key);
         $dma_cache_key = self::getDmaCacheKey($ad->dma_code);
         Redis::srem($dma_cache_key, $cache_key);
     }
 }
Exemplo n.º 2
0
 public static function removeCompanyFromKeywordCache($keyword, $str_id)
 {
     $cache_key = self::getKeywordCompaniesCacheKey($keyword);
     Redis::srem($cache_key, $str_id);
 }