protected function cacheJsAssetFiles()
    {
        if ($this->getOptions()->isProduction()) {
            // Retrieve asset file filters manager
            $oAssetFileFiltersManager = $this->getAssetFileFiltersManager();

            // Retrieve Js asset file filter if available
            $oJsFileFilter = $oAssetFileFiltersManager->has(\AssetsBundle\AssetFile\AssetFile::ASSET_JS) ? $oAssetFileFiltersManager->get(\AssetsBundle\AssetFile\AssetFile::ASSET_JS) : null;

            // Create tmp asset file
            $oTmpAssetFile = $this->createTmpAssetFile(\AssetsBundle\AssetFile\AssetFile::ASSET_JS);

            foreach ($this->getAssetFilesConfiguration()->getAssetFiles(\AssetsBundle\AssetFile\AssetFile::ASSET_JS) as $oAssetFile) {
                $sAssetFileContent = $oJsFileFilter ? $oJsFileFilter->filterAssetFile($oAssetFile) : $oAssetFile->getAssetFileContents();
                $oTmpAssetFile->setAssetFileContents($sAssetFileContent . PHP_EOL);
            }
            if($oTmpAssetFile->getAssetFileSize()){
                return array($this->getAssetFilesCacheManager()->cacheAssetFile($oTmpAssetFile));
            }
            return array();
        }

        // Retrieve asset files cache manager
        $oAssetFilesCacheManager = $this->getAssetFilesCacheManager();
        $aAssetFiles = array();
        foreach ($this->getAssetFilesConfiguration()->getAssetFiles(\AssetsBundle\AssetFile\AssetFile::ASSET_JS) as $oAssetFile) {
            // Cache asset file if not empty
            if($oAssetFile->getAssetFileSize()){
                $aAssetFiles[] = $oAssetFilesCacheManager->cacheAssetFile($oAssetFile);
            }
        }
        return $aAssetFiles;
    }