Return an instance of a FileCache
if (fileCache == null){
fileCache = new FileCache(){
protected void sendCache(SocketChannel socketChannel,
FileCacheEntry entry,
boolean keepAlive) throws IOException{
SSLOutputWriter.flushChannel(socketChannel,
entry.headerBuffer.slice());
ByteBuffer keepAliveBuf = keepAlive ? connectionKaBB.slice():
connectionCloseBB.slice();
SSLOutputWriter.flushChannel(socketChannel, keepAliveBuf);
SSLOutputWriter.flushChannel(socketChannel, entry.bb.slice());
}
};
fileCache.setIsEnabled(isEnabled);
fileCache.setLargeFileCacheEnabled(isLargeFileCacheEnabled);
fileCache.setSecondsMaxAge(secondsMaxAge);
fileCache.setMaxCacheEntries(maxCacheEntries);
fileCache.setMinEntrySize(minEntrySize);
fileCache.setMaxEntrySize(maxEntrySize);
fileCache.setMaxLargeCacheSize(maxLargeFileCacheSize);
fileCache.setMaxSmallCacheSize(maxSmallFileCacheSize);
fileCache.setCacheManager(cacheManager);
fileCache.setIsMonitoringEnabled(isMonitoringEnabled);
}
return fileCache;