gonzao_diaz wrote:
Yes. Put that cache-enabling tag in the parent class, ask for nice-formatted cache statistics, and check visually if the subclasses you expect are being cached at all.
Done :) but doesn't work.
Legenda: "Articolo" is the derived class ("B" in the example above). "Asseteditoriale" is the base class ("A") which is cached.
First call:
2008-01-14 18:28:22,964 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - articolo now: 1200331702964
2008-01-14 18:28:22,964 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - articolo now: 1200331702964
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - articolo Creation Time: 1200331702964 Next To Last Access Time: 0
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - articolo Creation Time: 1200331702964 Next To Last Access Time: 0
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - articolo mostRecentTime: 1200331702964
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - articolo mostRecentTime: 1200331702964
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - articolo Age to Idle: 120000 Age Idled: 0
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - articolo Age to Idle: 120000 Age Idled: 0
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - org.hibernate.cache.UpdateTimestampsCache: Is element with key articolo expired?: false
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - org.hibernate.cache.UpdateTimestampsCache: Is element with key articolo expired?: false
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - articolo now: 1200331702974
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - articolo now: 1200331702974
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - articolo Creation Time: 1200331702964 Next To Last Access Time: 0
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - articolo Creation Time: 1200331702964 Next To Last Access Time: 0
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - articolo mostRecentTime: 1200331702964
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - articolo mostRecentTime: 1200331702964
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - articolo Age to Idle: 120000 Age Idled: 10
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - articolo Age to Idle: 120000 Age Idled: 10
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - org.hibernate.cache.UpdateTimestampsCache: Is element with key articolo expired?: false
2008-01-14 18:28:22,974 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - org.hibernate.cache.UpdateTimestampsCache: Is element with key articolo expired?: false
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] store.MemoryStore (MemoryStore.java:201) - it.inera.icms.db.AsseteditorialeCache: MemoryStore hit for it.inera.icms.db.Asseteditoriale#11017
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] store.MemoryStore (MemoryStore.java:201) - it.inera.icms.db.AsseteditorialeCache: MemoryStore hit for it.inera.icms.db.Asseteditoriale#11017
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - it.inera.icms.db.Asseteditoriale#11017 now: 1200331702984
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - it.inera.icms.db.Asseteditoriale#11017 now: 1200331702984
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - it.inera.icms.db.Asseteditoriale#11017 Creation Time: 1200331679420 Next To Last Access Time: 1200331698888
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - it.inera.icms.db.Asseteditoriale#11017 Creation Time: 1200331679420 Next To Last Access Time: 1200331698888
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - it.inera.icms.db.Asseteditoriale#11017 mostRecentTime: 1200331698888
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - it.inera.icms.db.Asseteditoriale#11017 mostRecentTime: 1200331698888
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - it.inera.icms.db.Asseteditoriale#11017 Age to Idle: 120000 Age Idled: 4096
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - it.inera.icms.db.Asseteditoriale#11017 Age to Idle: 120000 Age Idled: 4096
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - it.inera.icms.db.Asseteditoriale: Is element with key it.inera.icms.db.Asseteditoriale#11017 expired?: false
2008-01-14 18:28:22,984 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - it.inera.icms.db.Asseteditoriale: Is element with key it.inera.icms.db.Asseteditoriale#11017 expired?: false
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] store.MemoryStore (MemoryStore.java:201) - it.inera.icms.db.AsseteditorialeCache: MemoryStore hit for it.inera.icms.db.Asseteditoriale#11017
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] store.MemoryStore (MemoryStore.java:201) - it.inera.icms.db.AsseteditorialeCache: MemoryStore hit for it.inera.icms.db.Asseteditoriale#11017
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - it.inera.icms.db.Asseteditoriale#11017 now: 1200331703284
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - it.inera.icms.db.Asseteditoriale#11017 now: 1200331703284
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - it.inera.icms.db.Asseteditoriale#11017 Creation Time: 1200331702994 Next To Last Access Time: 0
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - it.inera.icms.db.Asseteditoriale#11017 Creation Time: 1200331702994 Next To Last Access Time: 0
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - it.inera.icms.db.Asseteditoriale#11017 mostRecentTime: 1200331702994
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - it.inera.icms.db.Asseteditoriale#11017 mostRecentTime: 1200331702994
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - it.inera.icms.db.Asseteditoriale#11017 Age to Idle: 120000 Age Idled: 290
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - it.inera.icms.db.Asseteditoriale#11017 Age to Idle: 120000 Age Idled: 290
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - it.inera.icms.db.Asseteditoriale: Is element with key it.inera.icms.db.Asseteditoriale#11017 expired?: false
2008-01-14 18:28:23,284 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - it.inera.icms.db.Asseteditoriale: Is element with key it.inera.icms.db.Asseteditoriale#11017 expired?: false
after the caching
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] store.MemoryStore (MemoryStore.java:201) - it.inera.icms.db.AsseteditorialeCache: MemoryStore hit for it.inera.icms.db.Asseteditoriale#880
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] store.MemoryStore (MemoryStore.java:201) - it.inera.icms.db.AsseteditorialeCache: MemoryStore hit for it.inera.icms.db.Asseteditoriale#880
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - it.inera.icms.db.Asseteditoriale#880 now: 1200332011818
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:878) - it.inera.icms.db.Asseteditoriale#880 now: 1200332011818
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - it.inera.icms.db.Asseteditoriale#880 Creation Time: 1200331944802 Next To Last Access Time: 1200331985400
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:879) - it.inera.icms.db.Asseteditoriale#880 Creation Time: 1200331944802 Next To Last Access Time: 1200331985400
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - it.inera.icms.db.Asseteditoriale#880 mostRecentTime: 1200331985400
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:881) - it.inera.icms.db.Asseteditoriale#880 mostRecentTime: 1200331985400
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - it.inera.icms.db.Asseteditoriale#880 Age to Idle: 120000 Age Idled: 26418
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:882) - it.inera.icms.db.Asseteditoriale#880 Age to Idle: 120000 Age Idled: 26418
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - it.inera.icms.db.Asseteditoriale: Is element with key it.inera.icms.db.Asseteditoriale#880 expired?: false
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] ehcache.Cache (Cache.java:906) - it.inera.icms.db.Asseteditoriale: Is element with key it.inera.icms.db.Asseteditoriale#880 expired?: false
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] store.MemoryStore (MemoryStore.java:201) - it.inera.icms.db.AsseteditorialeCache: MemoryStore hit for it.inera.icms.db.Asseteditoriale#881
2008-01-14 18:33:31,818 DEBUG [http-8080-Processor25] store.MemoryStore (MemoryStore.java:201) - it.inera.icms.db.AsseteditorialeCache: MemoryStore hit for it.inera.icms.db.Asseteditoriale#881
[...]
Not a single line on "Articolo" being cached. I'm totally stuck here :(