portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Golden <ggol...@umich.edu>
Subject JetspeedDiskCache woes
Date Tue, 04 Jun 2002 19:23:31 GMT
Does anybody understand the JetspeedDiskCache code?  Can anybody tell me
what happens when a URL for an RSS portlet is first read?  This URL is
"external", so is cachable.

NewRSSPortlet (line 153) calls for an entry from the cache:

It looks like JetspeedDiskCache.add is eventually called (line 395), which
calls "this.fetch", and after this call the file shows up in the cache
directory.  But there is no attempt to store this file in the
JetspeedDiskCacheEntry's file member variable.

Isn't this a bug?

Then NewRSSPortlet calls for the entry's getData():

JetspeedDiskCacheEntry line 245

Which calls getReader (line 297):

It's not local (line 299)

It HAS NO FILE (line 317)

So it falls to read the URL again, but this time with a different class!
(URLFetcher.Refresh)

URLFetcher.Refresh (line 236) gets reading, and *might* call
JetspeedDiskCache.getEntry() again, this time with a (url, reader), which
*would* register the file in the entry... But in my tests, the "clength" is
-1 (it just read the same URL just fine and made a file in the cache folder,
remember), so it doesn't.

Instead if returns to JetspeedDiskCacheEntry line 229 with no file, and
throw the IOException:

this.getURL() + ": is not in cache after forcing"

This is what I get in my Jetspeed logs.

The URL is from moreover:

    <portlet-entry
 
name="http://p.moreover.com/cgi-local/page?c=Entertainment%3A%20film%20previ
ews&amp;o=rss"
        hidden="false" type="ref" parent="RSS" application="false">
        <meta-info>
            <title>News - Entertainment - Movies</title>
            <description>News - Tech - Movies</description>
        </meta-info>
 
<classname>org.apache.jetspeed.portal.portlets.NewRSSPortlet</classname>
        <url
cachedOnURL="true">http://p.moreover.com/cgi-local/page?c=Entertainment%3A%2
0film%20previews&amp;o=rss</url>
    </portlet-entry>

(from feed_local.xreg)

The cache file shows up as:

http_p.moreover.com_cgi-local_page#63;c=Entertainment%3A%20film%20previews&o
=rss

And has good content.

* * *

So, my questions:

Does anybody see what's going on here?  Why the first read but no file
stored in the entry?  Why the second read with clength = -1?

Does anybody use RSS feeds from non-local URLs, and do they work?  If so,
can I see a URL to one and try it here?

Why the two different ways to read the URL?

Thanks!

- Glenn
 
--------------------------------------------
Glenn R. Golden, Systems Research Programmer
University of Michigan School of Information
ggolden@umich.edu               734-615-1419
--------------------------------------------


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


Mime
View raw message