Re: General questions about caching in Cocoon
Lenz, Evan wrote: Does Cocoon provide a mechanism by which all pages on the site can be cached (perhaps via a crawler)? You can try indexer (see docs search demo). I'm aware of the command-line interface (and had trouble getting the crawler to get past the first page, but that's another story). Ultimately, I would like to use Cocoon as a servlet but have as many pages cached as possible at the click of a button, as opposed to waiting for each page to be requested. I suppose this could be done externally (with my own crawler) but I was wondering if Cocoon had some built-in mechanism for doing this. Also, I am building a site that has three versions per page (Flash, non-Flash, etc.) and that uses cookies to set a user's preference. All of my cookie logic is specified in sitemap.xmap, so I am already committed to using Cocoon as a servlet. Are there caching issues with such an approach? No. If done properly, every page will have then three cache entries: flash, non-flash, ... If performance ultimately becomes a problem, I suppose I could statically generate most of the pages and just use readers for each version of each page, but that wouldn't be ideal, as certain portions of the site are indeed dynamic. Better yet, try cache like Squid in front of Cocoon. Finally, if anyone has any words of wisdom with respect to using Cocoon for serving multiple versions of a page (from the same URL), I'd be happy to hear them. Study http headers (like Vary:) and use cache in front of cocoon - these together can make lots of requests serve from cache. Vadim Thanks, Evan - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: General questions about caching in Cocoon [REPOST under correct subject]
Evan, Hi. Does Cocoon provide a mechanism by which all pages on the site can be cached (perhaps via a crawler)? Besides the command line, as you note there was a brief discussion in the past about using LinkStatusGenerator to do that. Here's the link: http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102510586614217w=2 Sounds like you want to do this manually on demand. If you need to do it automatically at cocoon startup, you could write a component that calls the LinkStatusGenerator's generate method and just ignores the output. You'd probably do that via the Composable interface. Also, I am building a site that has three versions per page (Flash, non-Flash, etc.) and that uses cookies to set a user's preference. ... Are there caching issues with such an approach? There have been some recent changes to the caching mechanism which I haven't followed extremely closely (the addition of optional caching points) but that said, you shouldn't have problems. In general, all the logic during pipeline setup will run on every request (i.e., matchers, actions, etc.) but once the pipeline is determined the cached version will be served if its key matches a cached key. You'd want to nest a map:match type=cookie or write an action, or selector. Finally, if anyone has any words of wisdom with respect to using Cocoon for serving multiple versions of a page (from the same URL), I'd be happy to hear them. See the above - this is part of cocoon's beauty IMO. All logic for your site is encapsulated in one place using powerful tools. HTH, Geoff Howard __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
General questions about caching in Cocoon
Does Cocoon provide a mechanism by which all pages on the site can be cached (perhaps via a crawler)? I'm aware of the command-line interface (and had trouble getting the crawler to get past the first page, but that's another story). Ultimately, I would like to use Cocoon as a servlet but have as many pages cached as possible at the click of a button, as opposed to waiting for each page to be requested. I suppose this could be done externally (with my own crawler) but I was wondering if Cocoon had some built-in mechanism for doing this. Also, I am building a site that has three versions per page (Flash, non-Flash, etc.) and that uses cookies to set a user's preference. All of my cookie logic is specified in sitemap.xmap, so I am already committed to using Cocoon as a servlet. Are there caching issues with such an approach? If performance ultimately becomes a problem, I suppose I could statically generate most of the pages and just use readers for each version of each page, but that wouldn't be ideal, as certain portions of the site are indeed dynamic. Finally, if anyone has any words of wisdom with respect to using Cocoon for serving multiple versions of a page (from the same URL), I'd be happy to hear them. Thanks, Evan - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]