From: Christian M. <vc...@cl...> - 2002-07-25 17:27:31
|
Found 2 issues with the current cache code: one with the <jcs-cache> tag, i edited vertex.hbm.xml to do my testing. If i place the <jcs-cache> tag just after the <class> one it "works" , no error while parsing the xml If i place the <jcs-cache> tag after </subclass> and before </class> , got an error parsing the xml: Other error comes from the fact the class CacheEntry does not implement Serializable, it's mandatory that class going to the cache are serializable. quick fix : ClassPersister.java line 1035 private final class CacheEntry implements Serializable { Other observations: Got 3 vertex in my app and when i enter the show command, got debug info: 134383 [main] DEBUG cache.ReadOnlyCache - Caching: 0 134383 [main] DEBUG cache.ReadOnlyCache - Caching: 1 134383 [main] DEBUG cache.ReadOnlyCache - Caching: 2 - I thought the key was a composite one.... ( tableName + PK ), it appears it's only the PK ( if we want to be able to share a region cache among multiple classes we need a unique key) - Then i try to re enter the show command, i would expect to get some "Cache hit: xxx" debug info , but i get none.Are we sure that Hibernate does check the cache properly ? best regards Christian Meunier ----- Original Message ----- From: <Gavin_King/Cirrus%CI...@ci...> To: <hib...@li...> Cc: <vc...@cl...> Sent: Thursday, July 25, 2002 5:09 PM Subject: JCS integration > Christian Meunier got me started with some code to integrate Apache > Tubine's JCS today. I ended up rewriting much of the Cache package and > making some big improvements. Anyway, you may now specify a JCS cache in > the mapping file using > > <jcs-cache usage="read-only"/> > > or > > <jcs-cache usage="read-write"/> > > You must then configure the cache in the resource /cache.ccf > > I will deprecate the old homegrown cache soon. > > JCS supports things like in-memory LRU caching, disk-caching, distributed > caching, etc but be careful of using a distributed cache with usage > ="read-write". That probably wont work. > > All in CVS.... > > |