Controller/TranslationController.php
public function invalidateCacheAction(Request $request)
    {
        $this->get('lexik_translation.translator')->removeLocalesCacheFiles($this->getManagedLocales());

        $message = $this->get('translator')->trans('translations.cache_removed', array(), 'LexikTranslationBundle');

        if ($request->isXmlHttpRequest()) {
            $this->checkCsrf();

            return new JsonResponse(array('message' => $message));
        }

        $this->get('session')->getFlashBag()->add('success', $message);

        return $this->redirect($this->generateUrl('lexik_translation_grid'));
    }
public function invalidateCacheAction(Request $request)
    {
        $this->get('lexik_translation.translator')->removeLocalesCacheFiles($this->getManagedLocales());

        $message = $this->get('translator')->trans('translations.cache_removed', array(), 'LexikTranslationBundle');

        if ($request->isXmlHttpRequest()) {
            $this->checkCsrf();

            return new JsonResponse(array('message' => $message));
        }

        $this->get('session')->getFlashBag()->add('success', $message);

        return $this->redirect($this->generateUrl('lexik_translation_grid'));
    }
public function invalidateCacheAction ( Request $ request ) { $ this -> get ( 'lexik_translation.translator' ) -> removeLocalesCacheFiles ( $ this -> getManagedLocales ( ) ) ; $ message = $ this -> get ( 'translator' ) -> trans ( 'translations.cache_removed' , array ( ) , 'LexikTranslationBundle' ) ; if ( $ request -> isXmlHttpRequest ( ) ) { $ this -> checkCsrf ( ) ; return new JsonResponse ( array ( 'message' => $ message ) ) ; } $ this -> get ( 'session' ) -> getFlashBag ( ) -> add ( 'success' , $ message ) ; return $ this -> redirect ( $ this -> generateUrl ( 'lexik_translation_grid' ) ) ; }
Remove cache files for managed locales.

@return \Symfony\Component\HttpFoundation\RedirectResponse
Remove cache files for managed locales .