Exemple #1
0
 public static function get_unread_count_cache($member_id, $is_make_cache = false)
 {
     $cache_key = self::get_unread_count_cache_key($member_id);
     $cache_expir = \Config::get('notice.cache.unreadCount.expir');
     try {
         $unread_count = \Cache::get($cache_key, $cache_expir);
     } catch (\CacheNotFoundException $e) {
         $unread_count = null;
         if ($is_make_cache) {
             $unread_count = Model_NoticeStatus::get_unread_count4member_id($member_id);
             \Cache::set($cache_key, $unread_count, $cache_expir);
         }
     }
     return $unread_count;
 }