}
size += objectSize;
CacheObject cacheObject = new CacheObject(object, objectSize);
cachedObjectsHash.put(key, cacheObject);
//Make an entry into the cache order list.
LinkedListNode lastAccessedNode = lastAccessedList.addFirst(key);
//Store the cache order list entry so that we can get back to it
//during later lookups.
cacheObject.lastAccessedListNode = lastAccessedNode;
//Add the object to the age list
LinkedListNode ageNode = ageList.addFirst(key);
//We make an explicit call to currentTimeMillis() so that total accuracy
//of lifetime calculations is better than one second.
ageNode.timestamp = System.currentTimeMillis();
cacheObject.ageListNode = ageNode;