portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wil...@virgilio.it
Subject info about cache
Date Tue, 11 Nov 2003 14:56:11 GMT

Hi, i'd like to ask something about the way cache is handled.
The point i can' t realize is that: when i use some portlets that extends
FileWatchPortlet to cache its content and to update it when the file used
is modified, the content don't get updated.
I dig through the code and i fonud that when portletfactory create a portlet
it ask BasePortletConfig to set the url based on url specified for portlet.
The code for setURL contained in BasePortletConfig use TurbineServelt.getResource(url)
to get the url to be saved, but thii call returns something like : jndi:/localhost/jetspeed/url.
When JetspeedDiskCacheEntry test the last update time of the url, the file
that wil be tested is /localhost/jetspeed/url, which don' t exist> the call
to lastModified executed on this filename returns always 0.
I try to modify the code in setURL in BasePortletConfig and substituted
the call to TurbineServlet.getResource with TurbineServlet.getRealPath and
it works: now RSS portlet works
correctly and update its contents when i modified the corresponding file.

Another question:
In JetspeedDiskCacheEntry in getLastModified, the prefix is excluded with
a call to substring whith a constant 5 as parameter, to leave out the prefix:
shold it be replaced whith a function which search for a ":" and exclude
all character up to the position of ":". In this way we don't have to worry
 if the prefix change.

I hope to be sufficiently clear :) because i don't spek english....

comments are welcome!


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

View raw message