jtaylor 2002/07/14 14:11:19
Modified: src/java/org/apache/jcs/access CacheAccess.java
Log:
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!).
Revision Changes Path
1.8 +3 -3
jakarta-turbine-jcs/src/java/org/apache/jcs/access/CacheAccess.java
Index: CacheAccess.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/access/CacheAccess.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CacheAccess.java 23 May 2002 15:22:22 -0000 1.7
+++ CacheAccess.java 14 Jul 2002 21:11:19 -0000 1.8
@@ -274,11 +274,11 @@
public void put( Object name, Object obj )
throws CacheException
{
- // Call put with the contained caches default attributes.
+ // Call put with a copy of the contained caches default attributes.
put( ( Serializable ) name,
( Serializable ) obj,
- cacheControl.getElementAttributes() );
+ cacheControl.getElementAttributes().copy() );
}
/**
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>