|
|
|
[
Permlink
| « Hide
]
Lars Torunski - [20/Jul/05 12:31 AM ]
Please provide the patch when you are finished.
I haven't found any tests testing groups, so I added I method to TestAbstractCache.java
Doing this I stumbled upon this: When I have overflow persistence enabled and put an entry with a group (without exceeding the maxEntries limit) the entry is correctly not persisted, but the group is. Is this expected behaviour or a bug? These are the changed classes AbstractConcurrentReadCache and TestAbstractCache. I've already checked them in into my local CVS. I don't how how to create a patch in this case, so I send the full files, sorry.
I've made some more changes to AbstractConcurrentReadCache: - a new removeForce-Method that will remove the entry form the persistent store in any case (even if you have unlimitedDisk or overflowtoDisk). This is important if you need a removeEntry analog to flushEntry as I do. I call this method in my own Cache subclass - some changes to serialization (de/serialization wouldn't work anyway if one would use it as it is currently implemented): - listeners should not be serialized - readObject() must be implemented in subclasses, as AbstractConcurrentReadCache's readObject call the subclasses via put(key, value) and e.g. the list in LRUCache would be null in that moment Working with the new remove method I realized that removing a bigger number of entries is incredible slow now if one is using a DiskPersistenceListener (ca. 55 sec for 760 entries). This is apperently due to the fact that for each entry you don't have to touch just one file but 1 + x files. Where x is the number of groups the entry is in.
While I didn't fix the source of the problem (yet), I've made some changes to disk persistence (escpecially for groups) that will speed up things generally a little bit. I have now ca. 36 sec for the 760 entries. Should I add this as an attachment for this case, too, or should I open a new feature request? Christoph, please open an improvement issue for speed up the disk persistence and attach the source code.
I opened the improvement issue under : http://jira.opensymphony.com/browse/CACHE-197
AbstractConcurrentReadCache fixed in CVS HEAD. All unit tests and the new unit test group are OK.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||