src/Schema/Directives/CacheDirective.php
protected function store(CacheManager $cache, string $key, $value, ?Carbon $expiration, array $tags): void
    {
        $supportsTags = $this->useTags($cache);

        if ($expiration) {
            $supportsTags
                ? $cache->tags($tags)->put($key, $value, $expiration)
                : $cache->put($key, $value, $expiration);

            return;
        }

        $supportsTags
            ? $cache->tags($tags)->forever($key, $value)
            : $cache->forever($key, $value);
    }
protected function store(CacheManager $cache, string $key, $value, ?Carbon $expiration, array $tags): void
    {
        $supportsTags = $this->useTags($cache);

        if ($expiration) {
            $supportsTags
                ? $cache->tags($tags)->put($key, $value, $expiration)
                : $cache->put($key, $value, $expiration);

            return;
        }

        $supportsTags
            ? $cache->tags($tags)->forever($key, $value)
            : $cache->forever($key, $value);
    }
protected function store ( CacheManager $ cache , string $ key , $ value , ? Carbon $ expiration , array $ tags ) : void { $ supportsTags = $ this -> useTags ( $ cache ) ; if ( $ expiration ) { $ supportsTags ? $ cache -> tags ( $ tags ) -> put ( $ key , $ value , $ expiration ) : $ cache -> put ( $ key , $ value , $ expiration ) ; return ; } $ supportsTags ? $ cache -> tags ( $ tags ) -> forever ( $ key , $ value ) : $ cache -> forever ( $ key , $ value ) ; }
Store value in cache.

@param  \Illuminate\Cache\CacheManager  $cache
@param  string  $key
@param  mixed  $value
@param  \Carbon\Carbon|null  $expiration
@param  mixed[]  $tags
@return void
Store value in cache .