[Zope-dev] Re: Zope Book at ZopeWiki.org
On Thu, Apr 22, 2004 at 06:07:10AM -0400, Stephan Richter wrote: > I tried this and I can tell you that a Wiki is not the right format for a > book. While it lowers the entrance points, it is far too simplistic. I > eventually changed my master to LaTeX, where I can add as much meta-data and > other markup (especially for an index, which is crucial) easily and then I > try to create Wiki-friendly STX files from that. Would this help... LatexWiki is a patch to the ZWiki package that allows rendering of in-line LaTeX. http://mcelrath.org/Notes/LatexWiki -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 OntoSys, IncPGP keyID: 7B449345fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] AW: [Summary] Caching prob with AHCM and headers
On Thu, Sep 18, 2003 at 11:09:57AM +0100, seb bacon wrote: > I use squid, which doesn't require last-modified headers. I guess > that's not an option for you, or you'd probably already be using it ;-) > But in any case, I don't see why Shane's suggestion of uncommenting > the last-modified line shouldn't work. I use Squid as an HTTP accelerator in front of ZServer. What do last-modified headers have to do with this discussion? Anyway, I have a strong preference for working with stock code, rather than patching Zope itself or any of the products. > I use a standard HTTP Cache Manager for all our caching needs - I have > yet to find the granuality allowed by CPM necessary. Aha, I didn't realize that an HTTP Cache Manger can now handle FSDV objects. That does seem to make the CMF CPM unnecessary for my purposes. (I'm using Zope 2.6.1, CMF 1.4, and Plone 1.1alpha2). > (BTW, in the CMF you can associate FS Objects with named cache managers > by adding a file called foo.dtml.metadata with the following contents:: I'm able (I realize just now) to associate FS objects with an HTTP Cache Manager directly from the cache managers Associate tab in the ZMI, just like other cache-managable types. > The only class of request for which I need to have a separate policy is > requests from people who are actually editing a site. I have created a > customised HTTP Cache Manager which doesn't cache requests for specified > URLs. I then instruct site editors to edit the site using, e.g. > 'edit.mysite.com' and to view it using 'www.mysite.com'. Interesting approach. An HTTP Cache Manager has properties allowing it to be associated with an external "downstream" cache such as Squid, so that when a cached object is updated in Zope the cache manager notifies the external cache to purge the corresponding URL. But my few experiments with that (some months back, on an earlier version of Zope) showed that Zope would send a NOTIFY message with a different URL than the one that squid had associated with particular object, apparently because of URL path transformations caused by virtual hosting and/or skin lookup; so the old version of the updated object would remain in the squid cache. I wonder if that works better now. I'll try a few tests... P.S. Even if the NOTIFY interaction above worked right, that still would not address the problem where a page template does not change, but the generated content on that page does. I can see where a site author/editor might want to get a fresher view of such pages than is necessary for a random visitor. -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 OntoSys, IncPGP keyID: 7B449345fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] AW: [Summary] Caching prob with AHCM and headers
On Wed, Sep 17, 2003 at 06:25:47PM -0400, Tres Seaver wrote: > I have wanted to add a binding to the TALES namespace to allow access to > the "skin object" for some time: the current values in the namespace > are: > > 'content' -- the skin object's aq_parent That definition matches the reality, but in CachingPolicyManager.py in a comment it has this: 'content' -- the content object itself which I took at face value for far too long. > I think we should be adding in another binding, perhaps 'skinned' for > the skin object, which would allow you to filter on its metatype in your > predicate. I would like that. > I typically want to have skin images, as well as javascript and CSS > files, cached for much longer than rendered content views. YMMV. That makes sense. Is there a way to do that with the CMF 1.4 version of the "CPM"? One could, I suppose, test the names of the FSDV folders in CPM predicates, but that seems a royal PITA. That's why I'm making do with one-size-fits-all CPM policy for now. -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 OntoSys, IncPGP keyID: 7B449345fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] AW: [Summary] Caching prob with AHCM and headers
On Wed, Sep 17, 2003 at 10:03:15AM -0400, Tres Seaver wrote: > On Wed, 2003-09-17 at 07:26, Chris Withers wrote: > > Fred Yankowski wrote: > > >>> > > >>> python: content.meta_type == 'Filesystem Image' > > >> > > >>Do you have any content with this metatype? > > > > > > There is nothing in the portal_catalog with that meta_type. But there > > > are lots of objects with that type: most everything in > > > portal_skins/plone_images/, for example. > > > > Oh, I getcha now... hmmm.. since these are served from disk anyway, what would > > be the benefit in caching them? > > > > (Dim memories suggest that OFS.Image.Image does some work to circumvent caching, > > that's probabyl why they'er not being cached...) > > Two reasons: > > - Browser caches know about the HTTP headers, too. > > - Accelerators (Squid, Apache w/ mod_proxy and caching), cache content > to reduce load on the appserver. Right. I assumed all of that was obvious when I jumped into this thread. The CMF Caching Policy Manager object does not itself cache any objects (unlike the RAM Cache Manager, which does) -- it merely applies cache control headers to set the freshness of some published objects so that downstream caches can do real caching and take some load off of Zope, and perhaps off the network. My original question concerned a detail of how the CMF Caching Policy Manager interprets the 'Predicate' of a caching policy: it seems to interpret any 'content' object in that predicate as a reference to the *parent* object of the object being considered for cache header management. That made no sense to me, and I pointed to the exact code involved, but I still don't know if that code is the result of Undocumented Wisdom or merely a Goof. Meanwhile, back on the ranch, I'm getting good results with this policy predicate: python: content.meta_type == 'Filesystem Directory View' With that, all objects in a Filesystem Directory View get cache control headers. The aforementioned Wisdom|Goof prevents me (AFAICT) from discriminating different meta_types of the individual objects within the various FSDVs, but so far one policy across all such is just fine. -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 OntoSys, IncPGP keyID: 7B449345fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] AW: [Summary] Caching prob with AHCM and headers
On Mon, Sep 15, 2003 at 01:14:51PM +0100, Chris Withers wrote: > Fred Yankowski wrote: > >But I can't see how to create more restrictive Predicate. My initial > >attempt was to set Predicate like so: > > > > python: content.meta_type == 'Filesystem Image' > > Do you have any content with this metatype? There is nothing in the portal_catalog with that meta_type. But there are lots of objects with that type: most everything in portal_skins/plone_images/, for example. -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 OntoSys, IncPGP keyID: 7B449345fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] AW: [Summary] Caching prob with AHCM and headers
On Fri, Sep 12, 2003 at 10:13:44AM -0400, Tres Seaver wrote: > The CMF's CachingPolicyManger, which is specialized for caching skin > methods, already has such customizations: it allows spelling the > 'Last-Modified' header using a TALES expression, and also has checkboxes > for the 'no-cache', 'no-store', and 'must-revalidate' options of the > 'Cache-Control' header. Based on that note I decided to try CachingPolicyManager for the first time, and I'm confused about how it's supposed to work. In a CMF/Plone portal instance (CMF 1.4) I created a CMF Caching Policy Manager object. If I create a policy instance with default Predicate and Mod. Time values and a Max age of 999, FSImage objects are then published with appropriate cache control headers so that they expire after 999 seconds. Cool. But I can't see how to create more restrictive Predicate. My initial attempt was to set Predicate like so: python: content.meta_type == 'Filesystem Image' But that predicate never seems to return true. Looking at _setCacheHeaders() in CMFCore/utils.py, 'content' is set to 'aq_parent(obj)'. Because of that, any tests against 'content' in the Predicate apply to the Filesystem Directory View that contains the particular FSImage objects, rather than to the FSImage object itself. What good is that? -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 OntoSys, IncPGP keyID: 7B449345fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] New PostgreSQL Database Adapters: psycopg and ZpsycopgDA
Do you have any plans to get psycopg to work on Win32? On Wed, Feb 28, 2001 at 01:31:44PM +0100, Federico Di Gregorio wrote: > the guys here at initd (http://initd.org/) arre happy to announce > the release of psycopg, a Python/PostgreSQL driver module and ZPsycopgDA, > a Zope Database Adapter based on the psycopg driver. -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )