carlos beltran wrote:
> 
> We have been fighting a little with the cache system in Jetspeed 1.3.a1.
> Our goal was that of showing real time data in a portlet presenting a
> RSS page generated with JSP. But we had problems because the portlet
> content was not refreshed when the user was hitting the refresh button
> in his web browser.
> 
> Why?
> Answer: cache system.
> 
> Two different kinds of cache are acting in the portlet; the first one is
> caching the portlet object in memory and the second one is caching the
> URL that the portlet is using. This second cache is called the
> DiskCache. There is a third class of cache, but it is only working for
> the channels defined in OCS and it is known as FeedCache.
> The DiskCache has mainly two types of URL: locals and remotes. The
> locals are not cached and are directly get from the URL source ( so if
> your page is local you will not have problems). The DiskCache recognizes
> as locals the next types of URLs:
> 
> /test/test
> http://localhost
> http://127.0.0.1
> http://ourserver.domainame
> 
> Notice that the URL "http://ourserver"; is considered as remote...
> 
> The remotes URL are refreshed by the DiskCacheDaemon. This daemon runs
> with a interval defined in the JR.p; each time it runs it takes all the
> URL from the DiskCache and renews that ones that are remote and have
> passed over their "expiration time". This expiration time is hard coded
> in the source of DiskCacheEntry.java and it is equal to 15 minutes.
> 
> So what happens if you want to refresh your remote URL in the DiskCache
> with a interval lower than 15 minutes, ..well.., you can't, unless you
> change DiskCacheEntry to modify the default expiration time.
> 
> Then, playing with the "expiration time" and the daemon interval, you
> would be able to control the refresh of your portlet lower that 15
> minutes ( in fact we wanted a refresh time of 1 minute).
> 
> Finally,In both, local and remote URL, we would suggest to "jump" the
> "portlet cache". This can be done overwriting the isCacheable() method
> as it has been explained in other messages.
> 

Very good explanation ! Do you think you code write this in xdocs ?

BTW, I'm currently working on integrating Roberto Carrasco velocity work into
Jetspeed and considering to remove the Cacheable interface from the base
Portlet interface.

This way only those portlet implementations that want to be Cacheable need to
implement this feature.

To keep backward compatibility, we could have an AbstractPortlet implementing 
Cacheable and a DynamicAbstractPortlet that would not implement it (I would
prefer AbstractPortlet and CacheableAbstractPortlet but this may break portlets
extending AbstractPortlet and relying on the caheable interface methods...)

Would that suit you ?

--
Rapha�l Luta - [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to