Penrose 0.9.9 Persistent Cache
Introduction
Persistent cache uses a database server to store Penrose directory tree entries. This helps reducing the memory requirement. Also with persistent cache, if Penrose Server needs to be restarted, the cache does not need to be recreated. This configuration is recommended if you have a large database.
Create Database
You should be able to use any database server for persistent cache. Prepare an empty database for persistent cache.
Create Connection
Add a JDBC connection configuration in PENROSE_SERVER_HOME/conf/connections.xml pointing to the above database.
Configure Persistent Cache
Edit PENROSE_SERVER_HOME/conf/server.xml, modify the cache configuration as follows:
<server>
<entry-cache>
<cache-class>org.safehaus.penrose.cache.PersistentEntryCache</cache-class>
<parameter>
<param-name>connection</param-name>
<param-value>...</param-value>
</parameter>
</entry-cache>
<source-cache>
<cache-class>org.safehaus.penrose.cache.PersistentSourceCache</cache-class>
<parameter>
<param-name>connection</param-name>
<param-value>...</param-value>
</parameter>
</source-cache>
</server>
The connection parameter should contain to the name of the JDBC connection you created earlier.
Initialize Cache
First you will need to create tree nodes and the database tables. Go to PENROSE_SERVER_HOME/bin then execute:
cache.bat create
Then you need to load the initial data:
cache.bat load
This could take a while depending on the size of your data. Make your mapped data source are not being updated during this time.
After it's done, verify that your LDAP server contains the full data of your virtual directory.
Start Penrose Server
Start Penrose Server. Now you can use Penrose as usual.
Cache Clean-Up
If you need to empty the tree nodes and the database tables:
cache.bat clean
If you no longer need to use the persistent cache you can drop the tree nodes and database tables:
cache.bat drop