Example #1
0
 /**
  * Applies the provided function to the count cache setup/configuration.
  *
  * @param \Closure $function
  */
 public function apply(\Closure $function)
 {
     foreach ($this->model->countCaches() as $key => $cache) {
         $function($this->config($key, $cache));
     }
 }
 /**
  * Applies the provided function to the count cache setup/configuration.
  *\
  * @param callable $function
  */
 protected function applyToCountCache(\Closure $function)
 {
     foreach ($this->model->countCaches() as $key => $cache) {
         $function($this->countCacheConfig($key, $cache));
     }
 }