Skip to content

Commit 809a954

Browse files
author
James Taylor
committed
When 'put' is called without ElementAttributes, use
a _copy_ of the defaults, rather than the actual default object, so that we get correct create and last access times. Otherwise once you have passed cache init time + max idle time, everything will be a miss (yikes!). git-svn-id: https://svn.apache.org/repos/asf/jakarta/jcs/trunk@223996 13f79535-47bb-0310-9956-ffa450edef68
1 parent 15c9faf commit 809a954

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java/org/apache/jcs/access/CacheAccess.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,11 @@ public void putSafe( Object key, Object value )
274274
public void put( Object name, Object obj )
275275
throws CacheException
276276
{
277-
// Call put with the contained caches default attributes.
277+
// Call put with a copy of the contained caches default attributes.
278278

279279
put( ( Serializable ) name,
280280
( Serializable ) obj,
281-
cacheControl.getElementAttributes() );
281+
cacheControl.getElementAttributes().copy() );
282282
}
283283

284284
/**

0 commit comments

Comments
 (0)