You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by Apache Wiki <wi...@apache.org> on 2007/12/19 12:03:36 UTC

[Jackrabbit Wiki] Update of "CacheManager" by ThomasMueller

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The following page has been changed by ThomasMueller:
http://wiki.apache.org/jackrabbit/CacheManager

------------------------------------------------------------------------------
  The maximum size for all caches in CacheManager is 16 megabytes by default, but it can be changed like this:
  
  {{{
- repository = new TransientRepository();
+ Session session = new TransientRepository()
+                 .login(new SimpleCredentials("", new char[0]));
+ RepositoryImpl repository = (RepositoryImpl)session.getRepository();
  CacheManager manager = ((RepositoryImpl) repository).getCacheManager();
  manager.setMaxMemory(8 * 1024 * 1024); // default is 16 * 1024 * 1024
  manager.setMaxMemoryPerCache(1024 * 1024); // default is 4 * 1024 * 1024