Re: [Zope-CMF] Re: Re: CachingPolicyManager improvements checked in to svn
On 12 Sep 2005, at 17:12, Geoff Davis wrote: On Sat, 10 Sep 2005 16:04:18 +0100, Jens Vagelpohl wrote: Here's the result of my refactoring/rewriting for the tests in question: http://svn.zope.org/CMF/branches/geoffd-cachingpolicymanager-branch/? rev=38439view=rev Geoff, as the one with the most domain knowledge as far as the code changes go, could you check the tests (and especially the comments I have added) to make sure they make sense? Jens, Nice work with the refactoring. I especially like the more detailed comments. Thumbs up from me on merging the changes in. Alright, I might do it tonight. If I don't sit here at work until the wee hours... :/ jens ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: Re: CachingPolicyManager improvements checked in to svn
On Thu, 08 Sep 2005 17:45:54 +0100, Jens Vagelpohl wrote: All those tests run fine for me using your branch and a vanilla Zope 2.7.6. I'd make a wild guess and say it's your setup. Could be. Did you try removing the lines in test_Template304Handling.py that clean up the profile_registry? You'll either need Zope 2.8 installed or 2.7.x + ZopeTestCase. ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Re: CachingPolicyManager improvements
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexander Limi wrote: On Mon, 05 Sep 2005 22:20:02 +0200, Geoff Davis [EMAIL PROTECTED] wrote: Alternatively you can create a function that checks the modification times for the content and for all portlets as well. Embed that composite time in your ETag and you're all set. ESI would be cool, too, but I'm not betting that we'll see that any time soon. The new PlonePortlets infrastructure could help here too, the plan is to have built-in caching parameters for each portlet here - so it can know whether it has fresh content or not, and feed that to external mechanisms like the ETags. Still science fiction, though. ;) (And before you ask - yes, we're putting it in the Collective shortly. :) FYI, we have a portlet cache implementation on CPSPortlets tied with the CPS event service for the cache invalidation : If you wanna check : http://svn.nuxeo.org/trac/pub/file/CPSPortlets/trunk/doc/cpsportlets-RAMCache-draft.txt And the implementation over there : http://svn.nuxeo.org/trac/pub/file/CPSPortlets/trunk/PortletRAMCache.py And the ESI support on the portlet there : http://svn.nuxeo.org/trac/pub/file/CPSPortlets/trunk/CPSPortlet.py We never tested it though in here ;) Maybe Jean-Marc ? Feel free to ask questions on the cps lists if you feel like... Cheers, J. - -- Julien Anguenot | Nuxeo RD (Paris, France) CPS Platform : http://www.cps-project.org Zope3 / ECM : http://www.z3lab.org mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFDHZ55GhoG8MxZ/pIRAs2EAJ4/xdEyt0M6upCl8rUXRXw5N862vwCeOatt n0TtyB0id4euD1fokf0HucQ= =gre6 -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: Re: CachingPolicyManager improvements
On Mon, 05 Sep 2005 12:30:47 -0700, Alec Mitchell wrote: If you write your ETags in an appropriate way, this works beautifully for views. Consider an ETag that consists of a string containing (1) the content object's modification date, (2) the user name for the currently authenticated user, and (3) the current time rounded to the nearest hour. If a user gets this content while logged in, the ETag will match (1) when s/he is logged in, (2) if the content has not changed, and (3) if the cached copy is less than an hour old. You get cached, personalized content that is guaranteed not to be stale and has an expiration time that you control. Very good stuff. Except for any dynamic portlets on the page, but that's what ESI is for I guess. AJAX loaded content areas (which themselves could be cached with an ETag) would help here as well. Alternatively you can create a function that checks the modification times for the content and for all portlets as well. Embed that composite time in your ETag and you're all set. ESI would be cool, too, but I'm not betting that we'll see that any time soon. Chris McDonough suggested an interesting way to do a poor-man's ESI: use Apache's server side includes. Along the same lines, if you set up all have portlets to be methods that return a chunk of xhtml instead of ZPT macros, then you could fetch your portlets through Squid rather than by calling the methods directly. You'd have some overhead in assembling the page, but you'd get many of the benefits of ESI without having to wait for a Squid 3 release. ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] Re: Re: CachingPolicyManager improvements
Chris McDonough suggested an interesting way to do a poor-man's ESI: use Apache's server side includes. That's an interesting idea. On the Zope side, you'd just have to set up your templates to spit out html containing SSI directives, obviously no problem. But what's involved in the Apache configuration? Is it easy to set up SSI processing of content delivered via mod_proxy or mod_rewrite? Along the same lines, if you set up all have portlets to be methods that return a chunk of xhtml instead of ZPT macros, then you could fetch your portlets through Squid rather than by calling the methods directly. You'd have some overhead in assembling the page, but you'd get many of the benefits of ESI without having to wait for a Squid 3 release. Not sure I follow this. What does the final assembly? Your main ZPT template? If so, why not just cache the xhtml-fragment portlets in a RAMCacheManager instead? Probably faster than waiting on network traffic to/from squid, and definitely easier to set up. Another thing I've thought of: Put your portlets in iframes. But I've done only minimal work with iframes and don't really know what the implications are. -PW ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: Re: CachingPolicyManager improvements
On Mon, 05 Sep 2005 22:20:02 +0200, Geoff Davis [EMAIL PROTECTED] wrote: Alternatively you can create a function that checks the modification times for the content and for all portlets as well. Embed that composite time in your ETag and you're all set. ESI would be cool, too, but I'm not betting that we'll see that any time soon. The new PlonePortlets infrastructure could help here too, the plan is to have built-in caching parameters for each portlet here - so it can know whether it has fresh content or not, and feed that to external mechanisms like the ETags. Still science fiction, though. ;) (And before you ask - yes, we're putting it in the Collective shortly. :) -- _ Alexander Limi · Chief Architect · Plone Solutions · Norway Consulting · Training · Development · http://www.plonesolutions.com _ Plone Co-Founder · http://plone.org · Connecting Content Plone Foundation · http://plone.org/foundation · Protecting Plone ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] Re: Re: CachingPolicyManager improvements
On Tue, 06 Sep 2005 05:39:45 +0200, Alexander Limi wrote: On Mon, 05 Sep 2005 22:20:02 +0200, Geoff Davis [EMAIL PROTECTED] wrote: Alternatively you can create a function that checks the modification times for the content and for all portlets as well. Embed that composite time in your ETag and you're all set. ESI would be cool, too, but I'm not betting that we'll see that any time soon. The new PlonePortlets infrastructure could help here too, the plan is to have built-in caching parameters for each portlet here - so it can know whether it has fresh content or not, and feed that to external mechanisms like the ETags. Still science fiction, though. ;) (And before you ask - yes, we're putting it in the Collective shortly. :) Sounds great! I'm looking forward to it. ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests