original_string: 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'));
      }
code: 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'));
      }
code_tokens: 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' ) ) ; }
docstring: Forget a cache key
docstring_tokens: Forget a cache key