Change DBFlat Caching To Use MemoryService
Description
incorporates
relates to
Activity
David Horwitz July 30, 2008 at 4:11 AM
Chuck - this wont merge cleanly in 2-5-x:
> svn merge -c49404 https://source.sakaiproject.org/svn/db/branches/pre-K1/ db
C db/db-util/storage/src/java/org/sakaiproject/util/BaseDbFlatStorage.java
C db/db-util/storage/pom.xml
would you be able to have a look?
Thanks
David
Stephen Marquard July 29, 2008 at 11:57 PM
Tested on trunk build.
Charles R Severance July 29, 2008 at 9:39 AM
Everything in this JIRA still needs to go back to 2-5-x - except the ehcache fix - which was done and then un-done.
Charles R Severance July 29, 2008 at 9:38 AM
Aaron came up with a different way to configure the caches so the comment
I put in the file is no longer valid.
Undo r49444
Sending memory-api/api/src/java/org/sakaiproject/memory/api/ehcache.xml
Transmitting file data .
Committed revision 49653.
Aaron Zeckoski July 29, 2008 at 4:41 AM
Also, for completeness, making the caches beans allows Stephen to get most of what he wants.
For a more long term solution, I would suggest a thinner layer on top of the caching mechanism with support for clustering:
https://source.sakaiproject.org/contrib/caret/caching/trunk/
The DBFlat Caching as created by directly requests the CacheManager singleton. This pattern should not be used - instead MemoryService.newCache should be used. It is still backed by ehCache - using MemoryService is more compatible with the other uses of ehCache throughout the system.
This has other advantages: (1) The admin memory tool can monitor and reset the caches and (2) the caches can be monitored using JMX, and (3) the parameters for these caches can be overridden in the ehcache.xml.
This fixes
See also