portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: Caching in Jetspeed 2.1.2
Date Fri, 01 Aug 2008 16:39:50 GMT

On Aug 1, 2008, at 12:36 AM, Siofra wrote:
>
> Hello,
>
> Thanks for your reply. It is a requirement that the same user will  
> login
> from different locations and share session state. However, I think I  
> can
> make the user-experience better by decreasing the cache expiry value.
> Currently, Jetspeed caching is performed as per the configuration in
> db-page-manager.xml.
>
> Here are my settings:
>
>  <bean id="org.apache.jetspeed.page.PageManagerImpl"
>        name="pageManagerImpl"
>        init-method="init"
>        class="org.apache.jetspeed.page.impl.DatabasePageManager">
>      <!-- OJB configuration file resource path -->
>      <constructor-arg
> index="0"><value>JETSPEED-INF/ojb/page-manager-repository.xml</ 
> value></constructor-arg>
>      <!-- folder/page/link cache size, default=128, min=128 -->
>      <constructor-arg index="1"><value>5000</value></constructor-arg>
>      <!-- folder/page/link cache expires seconds, default=-1,  
> infinite=0,
> min=30 -->
>      <!--                                         (default is 150  
> seconds)
> -->
>      <constructor-arg index="2"><value>72000</value></constructor-arg>
>      <!-- permissions security enabled flag, default=false -->
>      <constructor-arg index="3"><value>false</value></constructor-arg>
>      <!-- constraints security enabled flag, default=true -->
>      <constructor-arg index="4"><value>true</value></constructor-arg>
>  </bean>
>
> Constructor-arg index 2 is set to 7200, or 2 hours. Can you confirm  
> that
> this corresponds to the cache timeout/expiry period? If I reduce  
> this to a
> couple of minutes or some other lower value it should decrease the  
> time for
> which there will be a difference between the content on both  
> servers, right?
>
Yes,  the third constructor  (index=2) argument is the cache  
expiration in seconds for pages. (index=1 is the size of the cache)
If you are not customizing your pages (adding/removing/moving  
portlets, adding/removing pages), then there is no real reason to set  
this cache value low, since the pages are effectively read-only.
In general the lower you set the cache value, the more your  
application is going to hit and possibly bottleneck on the database.  
So be careful with that setting.

If your application updates preferences, you will also want to look at  
the preferences settings in  ehcache.xml and turn on (remove the  
comments) rmi cache replication:

<cache name="preferencesCache"
            maxElementsInMemory="10000"
            maxElementsOnDisk="1000"
            eternal="true"
            overflowToDisk="false"
            timeToIdleSeconds="0"
            timeToLiveSeconds="0"
            memoryStoreEvictionPolicy="LFU">

         <cacheEventListenerFactory
                  
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                 properties="replicateAsynchronously=true,  
replicatePuts=false,
                             replicateUpdates=false,  
replicateUpdatesViaCopy=false,
                             replicateRemovals=true"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Mime
View raw message