long currentTimeMillis = 0;
Iterator<Map.Entry<Object, InternalCacheEntry>> entryIterator = entries.entrySet().iterator();
while (entryIterator.hasNext()) {
Map.Entry<Object, InternalCacheEntry> entry = entryIterator.next();
final InternalCacheEntry value = entry.getValue();
if (value.canExpire()) {
if (currentTimeMillis == 0)
currentTimeMillis = timeService.wallClockTime();
if (entry.getValue().isExpired(currentTimeMillis)) {
entryIterator.remove();
result = true;