Dashboard > Penrose 1.0 > ... > Cache > Persistent Cache
Persistent Cache
Added by Endi S. Dewata, last edited by Jim Yang on Jun 05, 2007  (view change)
Labels: 
(None)


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

Site running on a free Atlassian Confluence Open Source Project License granted to Safehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators