jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "CacheManager" by ThomasMueller
Date Wed, 19 Dec 2007 11:03:36 GMT
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

Mime
View raw message