public Object put(Object key, Object value)
    {
        long objectStamp = System.currentTimeMillis();
        synchronized (objects)
        {
            objectTimeStamps.put(key, objectStamp);
            if (nextTimeSomeExpired == NO_OBJECTS)
            {
                nextTimeSomeExpired = objectStamp;
            }
            return objects.put(key, value);
        }
    }
public Object put ( Object key , Object value ) { long objectStamp = System . currentTimeMillis ( ) ; synchronized ( objects ) { objectTimeStamps . put ( key , objectStamp ) ; if ( nextTimeSomeExpired == NO_OBJECTS ) { nextTimeSomeExpired = objectStamp ; } return objects . put ( key , value ) ; } }
Method to store value in cache, if this value first in cache - also mark nextTimeSomeExpired
as its creating time;

@param key,  may not be null
@param value - any value object
@return old value or null