/** * Configure the Grizzly HTTP FileCache mechanism */ protected FileCache configureHttpFileCache(org.glassfish.grizzly.config.dom.FileCache cache) { final FileCache fileCache = new FileCache(); if (cache != null) { fileCache.setEnabled(GrizzlyConfig.toBoolean(cache.getEnabled())); fileCache.setSecondsMaxAge(Integer.parseInt(cache.getMaxAgeSeconds())); fileCache.setMaxCacheEntries(Integer.parseInt(cache.getMaxFilesCount())); fileCache.setMaxLargeFileCacheSize(Integer.parseInt(cache.getMaxCacheSizeBytes())); } else { fileCache.setEnabled(false); } return fileCache; }
/** * Configure the Grizzly HTTP FileCache mechanism */ protected FileCache configureHttpFileCache(org.glassfish.grizzly.config.dom.FileCache cache) { final FileCache fileCache = new FileCache(); if (cache != null) { fileCache.setEnabled(GrizzlyConfig.toBoolean(cache.getEnabled())); fileCache.setSecondsMaxAge(Integer.parseInt(cache.getMaxAgeSeconds())); fileCache.setMaxCacheEntries(Integer.parseInt(cache.getMaxFilesCount())); fileCache.setMaxLargeFileCacheSize(Integer.parseInt(cache.getMaxCacheSizeBytes())); } else { fileCache.setEnabled(false); } return fileCache; }