private function update($model, $operation)
    {
        $countCache = new CountCache($model);
        $countCache->apply(function ($config) use ($countCache, $model, $operation) {
            $countCache->updateCacheRecord($config, $operation, 1, $model->{$config['foreignKey']});
        });
    }
private function update($model, $operation)
    {
        $countCache = new CountCache($model);
        $countCache->apply(function ($config) use ($countCache, $model, $operation) {
            $countCache->updateCacheRecord($config, $operation, 1, $model->{$config['foreignKey']});
        });
    }
private function update ( $ model , $ operation ) { $ countCache = new CountCache ( $ model ) ; $ countCache -> apply ( function ( $ config ) use ( $ countCache , $ model , $ operation ) { $ countCache -> updateCacheRecord ( $ config , $ operation , 1 , $ model -> { $ config [ 'foreignKey' ] } ) ; } ) ; }
Handle most update operations of the count cache.

@param $model
@param string $operation + or -
Handle most update operations of the count cache .