Bug fix in Bean caching
This commit is contained in:
parent
47cfb895fb
commit
ad970e3317
2 changed files with 2 additions and 2 deletions
BIN
Zutil.jar
BIN
Zutil.jar
Binary file not shown.
4
src/zutil/db/bean/DBBeanSQLResultHandler.java
Normal file → Executable file
4
src/zutil/db/bean/DBBeanSQLResultHandler.java
Normal file → Executable file
|
|
@ -169,7 +169,7 @@ public class DBBeanSQLResultHandler<T> implements SQLResultHandler<T>{
|
|||
}
|
||||
|
||||
if( removed > 0 )
|
||||
logger.info("DBBeanGarbageCollector has cleard "+removed+" beans from cache.");
|
||||
logger.info("DBBeanGarbageCollector has cleared "+removed+" beans from cache.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ public class DBBeanSQLResultHandler<T> implements SQLResultHandler<T>{
|
|||
// Check if the cache is valid
|
||||
if( item != null ){
|
||||
// The cache is old, update and return it
|
||||
if( item.timestamp+CACHE_TTL > System.currentTimeMillis() ){
|
||||
if( item.timestamp+CACHE_TTL < System.currentTimeMillis() ){
|
||||
// There is no ResultSet to update from
|
||||
if( result == null )
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue