Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
jcs-1.3
-
None
Description
IndexedDiskCache add a Runtime's shutdown hook to dispose itself. However, this behaves differently from calling CompositeCacheManager.shutdown(). The former fails to save the keys into the disk while the latter can do so. Below is the run log from IndexedDiskCache.Shutdown running during JVM shutdown: (index and data file is empty)
[2007-11-13 11:44:36,221] [WARN ] [IndexedDiskCache] Region [scxmlcontext] Disk cache not shutdown properly, shutting down now.
[2007-11-13 11:44:36,221] [INFO ] [CompositeCache] In DISPOSE, [scxmlcontext] fromRemote [false]
Region Name = scxmlcontext
HitCountRam = 0
HitCountAux = 0
---------------------------LRU Memory Cache
List Size = 2
Map Size = 2
Put Count = 2
Hit Count = 0
Miss Count = 0
---------------------------Indexed Disk Cache
Is Alive = true
Key Map Size = 0
Data File Length = 0
Hit Count = 0
Bytes Free = 0
Optimize Operation Count = 0
Times Optimized = 0
Recycle Count = 0
Recycle Bin Size = 0
Startup Size = 0
Purgatory Hits = 0
Purgatory Size = 0
Working = true
Alive = false
Empty = true
Size = 0
[2007-11-13 11:44:36,221] [DEBUG] [IndexedDiskCache] Region [scxmlcontext] Saving keys to: scxmlcontext, key count: 0
[2007-11-13 11:44:36,237] [INFO ] [CompositeCache] In DISPOSE, [scxmlcontext] SKIPPING auxiliary [org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache@197bb7] fromRemote [false]
[2007-11-13 11:44:36,237] [DEBUG] [IndexedDisk] Resetting Indexed File [D:\gila\scxmlcontext.key]