private void possibleAddEntryToCache(final String fileName, final FileCacheEntry entry, final String[] eTag) throws HTTPException
	{
		synchronized(cache)
		{
			if(entry.buf[CompressionType.NONE.ordinal()] == null)
			{
				cache.put(fileName, entry);
				return;
			}
			final long targetBytes = cacheMaxBytes-entry.bufsSize.get();
			if(totalBytes.get() > targetBytes)
			{
				final long currentTime=System.currentTimeMillis();
				for(final Iterator<String> k=cache.keySet().iterator(); k.hasNext();)
				{
					final String key=k.next();
					final FileCacheEntry e=cache.get(key);
					if(currentTime >= entry.expires.getTime())
					{
						k.remove();
						cache.remove(key);
						if(e.bufsSize.get() > 0)
						{
							if(totalBytes.addAndGet(-e.bufsSize.get()) <= targetBytes)
								break;
						}
					}
				}
			}
			if(totalBytes.get() <= targetBytes)
			{
				totalBytes.addAndGet(entry.bufsSize.get());
				cache.put(fileName, entry);
				checkAndSetETag(entry,eTag); // DO THIS AFTER CACHING!!!
			}
		}
	}