RE: No Cacheable Portlets - Doesn't work?
carlos beltran wrote: I think there is a minimum "lifespan" for any given URL. It is configurable (I'm not sure), and the default, I think, is 15 minutes. Where is this configured? Also, according to the log, a page is reloaded when it expires. How is this expiration set? Is this the same thing as "lifespan'? -- -- To subscribe:[EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Search: http://www.mail-archive.com/jetspeed@list.working-dogs.com/ List Help?: [EMAIL PROTECTED]
Re: No Cacheable Portlets - Doesn't work?
Santiago Gala wrote: carlos beltran wrote: But it is not working!! Jetspeed is caching the jsp page and sending cache hits with this page. So the portlet is still using the cache and the channel is not renewed ! :(. Why is this happening? Has jetspeed a diferent behavior with JSP pages? Why is the portlet still using the cache?? There are two caches here: - portletcache takes care of caching the portlet object in memory. - diskcache takes care of caching the URL to avoid thrashing other servers. Thanks Santiago, I understand the situation. But it was also confusing when I was trying to control the frecuency of the cache reload. It doesn't seem to follow a regular patern. I don't know if I was using the right parameters but I tried to reduce the diskcache frecuency down to 1 minute but the diskcache daemon seems to use a aleatory frecuency between 1 and 5 minutes? Could this be related with the intelligent behavior of the cache that is downloading depending of the network state ( if I have understood correctly from the documentation)??? Gracias!!. Carlos. -- -- To subscribe:[EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Search: http://www.mail-archive.com/jetspeed@list.working-dogs.com/ List Help?: [EMAIL PROTECTED]
Re: No Cacheable Portlets - Doesn't work?
carlos beltran wrote: Santiago Gala wrote: carlos beltran wrote: But it is not working!! Jetspeed is caching the jsp page and sending cache hits with this page. So the portlet is still using the cache and the channel is not renewed ! :(. Why is this happening? Has jetspeed a diferent behavior with JSP pages? Why is the portlet still using the cache?? There are two caches here: - portletcache takes care of caching the portlet object in memory. - diskcache takes care of caching the URL to avoid thrashing other servers. Thanks Santiago, I understand the situation. But it was also confusing when I was trying to control the frecuency of the cache reload. It doesn't seem to follow a regular patern. I don't know if I was using the right parameters but I tried to reduce the diskcache frecuency down to 1 minute but the diskcache daemon seems to use a aleatory frecuency between 1 and 5 minutes? Could this be related with the intelligent behavior of the cache that is downloading depending of the network state ( if I have understood correctly from the documentation)??? I think there is a minimum "lifespan" for any given URL. It is configurable (I'm not sure), and the default, I think, is 15 minutes. The process is: The daemon traverses the list of cached URLs, and places a job in the queue to update each URL. When those jobs are run, the entry is checked and refreshed if: - it is not in the "Bad" list - it has expired - it is not currently being loaded by a different thread (to avoid flooding remote server with requests) - it return a 2XX status code when asked if "If-Modified-Since: lastmod-date" When an entry has an error but it is in the cache, it is first deleted from the cache (to avoid problems with corrupted entries) and NOT put into the Bad list. Later, when tried to reload, it will either be fetched or marked definitely as "Bad". I am thinking of a implementation (suggested by Raphal) where entries that fail will be marked in different ways (depending on the error), an retried on a different basis. The idea is: - Some network timeouts could be done to remote site maintenance or local transient network failures. So, instead of showing a "red card" to the URL, like in soccer, we will put them out, like in other sports, 3 updates , for instance. The number will increase on each failure, and reset when the URL is loaded. The idea is to have something similar to the "exponential backoff" algorithm in TCP, that allows us to stop working when, for instance, network is down, but allows quick recovery after situation gets nominal again. - Other errors, like "File not found", are more permanent, as they mean either bad url or bad configuration in the remote server. - Errors like "Host not found", are again different. They could be due to dns failures or to bad url. - There are other errors, like problems with encodings and illegal XML syntax. My current settings are: - FeedDaemon runs every 20hours. - DiskCacheDaemon runs every hour. - BadURLManagerDaemon runs every three hours. On a related note, I have seen that, after URLs update, the portlets don't refresh until the session times out. This could be due to (uncommited) modifications I have for caching the portletset during the session. -- -- To subscribe:[EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Search: http://www.mail-archive.com/jetspeed@list.working-dogs.com/ List Help?: [EMAIL PROTECTED]
Re: No Cacheable Portlets - Doesn't work?
carlos beltran wrote: Hi All, I am trying to create a portlet that doesn't use the cache. I have read that this can be done by creating a portlet with the isCacheable() method returning false. I have done so extending the newRSSPorlet and creating a new portlet called NoCacheRSSPortlet. After, I declared it in the portlet registry ( jetspeed.conf) and I created I new instance that is downloading a jsp page, this way: portlet-entry type="ref" parent="NoCacheRSS" name="NoCacheNews" urlhttp://giliberto.quepasa.it:18080/news/news/rssNews.jsp/url meta-info titleNo Cache News/title /meta-info /portlet-entry The JSP page is generating a page in RSS format. But it is not working!! Jetspeed is caching the jsp page and sending cache hits with this page. So the portlet is still using the cache and the channel is not renewed ! :(. Why is this happening? Has jetspeed a diferent behavior with JSP pages? Why is the portlet still using the cache?? There are two caches here: - portletcache takes care of caching the portlet object in memory. - diskcache takes care of caching the URL to avoid thrashing other servers. You have removed memory cache for this portlet, but not disk cache. So your url will be updated once an hour when DiskCacheDaemon runs. The only URLs that the current DiskCache does not cache are "localhost", "yourhostname" and "file:/" urls. I have a prototype of the new cache, but I'm flooded with other work, and it is not even functional now. Once think we will have there is being able to specify regular-expression cacheability of URLs. I'll think of a quick workaroud for specifying non cacheable URLs with the current codebase. -- -- To subscribe:[EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Search: http://www.mail-archive.com/jetspeed@list.working-dogs.com/ List Help?: [EMAIL PROTECTED]