original_string: public function clearThumbnailAction(Request $request)
      {
          $path = $request->get('path');
          $filter = $request->get('filter');
          $response = [
              'error' => false,
              'success' => false
          ];
  
          if ($path && $filter) {
              /** @var CacheManager $cacheManager */
              $cacheManager = $this->get('liip_imagine.cache.manager');
              // Filter is purposely left out on the remove call, it should remove all the caches for the current given file.
              $cacheManager->remove($path);
              $cacheManager->getBrowserPath($path, $filter);
              $response['success'] = true;
              $response['url']  = $cacheManager->generateUrl($path, $filter);
          } else {
              $response['error'] = 'No "path" or "filter" provided';
          }
  
          return new JsonResponse($response);
      }
code: public function clearThumbnailAction(Request $request)
      {
          $path = $request->get('path');
          $filter = $request->get('filter');
          $response = [
              'error' => false,
              'success' => false
          ];
  
          if ($path && $filter) {
              /** @var CacheManager $cacheManager */
              $cacheManager = $this->get('liip_imagine.cache.manager');
              // Filter is purposely left out on the remove call, it should remove all the caches for the current given file.
              $cacheManager->remove($path);
              $cacheManager->getBrowserPath($path, $filter);
              $response['success'] = true;
              $response['url']  = $cacheManager->generateUrl($path, $filter);
          } else {
              $response['error'] = 'No "path" or "filter" provided';
          }
  
          return new JsonResponse($response);
      }
code_tokens: public function clearThumbnailAction ( Request $ request ) { $ path = $ request -> get ( 'path' ) ; $ filter = $ request -> get ( 'filter' ) ; $ response = [ 'error' => false , 'success' => false ] ; if ( $ path && $ filter ) { /** @var CacheManager $cacheManager */ $ cacheManager = $ this -> get ( 'liip_imagine.cache.manager' ) ; // Filter is purposely left out on the remove call, it should remove all the caches for the current given file. $ cacheManager -> remove ( $ path ) ; $ cacheManager -> getBrowserPath ( $ path , $ filter ) ; $ response [ 'success' ] = true ; $ response [ 'url' ] = $ cacheManager -> generateUrl ( $ path , $ filter ) ; } else { $ response [ 'error' ] = 'No "path" or "filter" provided' ; } return new JsonResponse ( $ response ) ; }
docstring: Remove thumbnail for given path
  
  @param Request $request
  @return JsonResponse
  
  @Route("/clear-thumbnail")
docstring_tokens: Remove thumbnail for given path