public function delete($key, $tags = '')
    {
        $cache = app('cache');

        if (!empty($tags)) {
            $tags = json_decode($tags, true);
            $cache = $cache->tags($tags);
        } else {
            unset($tags);
        }

        $success = $cache->forget($key);

        return response()->json(compact('success'));
    }
public function delete($key, $tags = '')
    {
        $cache = app('cache');

        if (!empty($tags)) {
            $tags = json_decode($tags, true);
            $cache = $cache->tags($tags);
        } else {
            unset($tags);
        }

        $success = $cache->forget($key);

        return response()->json(compact('success'));
    }
public function delete ( $ key , $ tags = '' ) { $ cache = app ( 'cache' ) ; if ( ! empty ( $ tags ) ) { $ tags = json_decode ( $ tags , true ) ; $ cache = $ cache -> tags ( $ tags ) ; } else { unset ( $ tags ) ; } $ success = $ cache -> forget ( $ key ) ; return response ( ) -> json ( compact ( 'success' ) ) ; }
Forget a cache key
Forget a cache key