Re: [Zope-dev] Re: Caching ZCatalog results

2007-03-07 Thread Lennart Regebro
On 3/6/07, Dieter Maurer [EMAIL PROTECTED] wrote: Lennart Regebro wrote at 2007-2-23 21:25 +0100: ... Compared with Lucene for example, which instead will create iterators who will only resturn the next match. This saves you from a lot of index searching when you have big results. I don't know

Re: [Zope-dev] Re: Caching ZCatalog results

2007-03-06 Thread Dieter Maurer
Roché Compaan wrote at 2007-2-25 11:48 +0200: ... I see several problems: * the RAMCacheManager does not provide an API to implement this policy * a cache manager would need a special data structure to efficiently implement the policy (given a documentId, find all

Re: [Zope-dev] Re: Caching ZCatalog results

2007-03-06 Thread Dieter Maurer
Lennart Regebro wrote at 2007-2-23 21:25 +0100: ... Compared with Lucene for example, which instead will create iterators who will only resturn the next match. This saves you from a lot of index searching when you have big results. I don't know if it is feasible to do something like that, but it

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-25 Thread Roché Compaan
On Sat, 2007-02-24 at 09:48 +0100, Dieter Maurer wrote: Roché Compaan wrote at 2007-2-23 22:00 +0200: ... Thanks for that pointer. It's good that way, it should make invalidation easier. It could be as simple as invalidating any cached result that contains the documentId being indexed. Do

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-25 Thread Roché Compaan
On Fri, 2007-02-23 at 21:25 +0100, Lennart Regebro wrote: On 2/23/07, Philipp von Weitershausen [EMAIL PROTECTED] wrote: It may require a bit of hacking the catalog, of course. Perhaps it's time to start thinking about componentizing the Zope 2 catalog to make such things easier in the

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-24 Thread Dieter Maurer
Roché Compaan wrote at 2007-2-23 22:00 +0200: ... Thanks for that pointer. It's good that way, it should make invalidation easier. It could be as simple as invalidating any cached result that contains the documentId being indexed. Do you see any problem with the following invalidation strategy:

[Zope-dev] Re: Caching ZCatalog results

2007-02-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roché Compaan wrote: I'm curious, has anybody played around with the idea of caching ZCatalog results and if I submitted a patch to do this would it be excepted? I quickly coded some basic caching of results on a volatile attribute and I was

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-23 Thread Roché Compaan
On Fri, 2007-02-23 at 06:55 -0500, Tres Seaver wrote: Roché Compaan wrote: I'm curious, has anybody played around with the idea of caching ZCatalog results and if I submitted a patch to do this would it be excepted? I quickly coded some basic caching of results on a volatile attribute

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Roché Compaan wrote: On Fri, 2007-02-23 at 06:55 -0500, Tres Seaver wrote: Roché Compaan wrote: I'm curious, has anybody played around with the idea of caching ZCatalog results and if I submitted a patch to do this would it be excepted? I

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tres Seaver wrote: Roché Compaan wrote: On Fri, 2007-02-23 at 06:55 -0500, Tres Seaver wrote: Roché Compaan wrote: I'm curious, has anybody played around with the idea of caching ZCatalog results and if I submitted a patch to do this would it be

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-23 Thread Roché Compaan
On Fri, 2007-02-23 at 12:09 -0500, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tres Seaver wrote: Roché Compaan wrote: On Fri, 2007-02-23 at 06:55 -0500, Tres Seaver wrote: Roché Compaan wrote: I'm curious, has anybody played around with the idea of caching

[Zope-dev] Re: Caching ZCatalog results

2007-02-23 Thread Philipp von Weitershausen
Tres Seaver wrote: Tres Seaver wrote: Roché Compaan wrote: On Fri, 2007-02-23 at 06:55 -0500, Tres Seaver wrote: Roché Compaan wrote: I'm curious, has anybody played around with the idea of caching ZCatalog results and if I submitted a patch to do this would it be excepted? I quickly coded

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-23 Thread Dieter Maurer
Roché Compaan wrote at 2007-2-23 18:44 +0200: ... Cool idea. I haven't done any coding involving OFS.Cache though. Looking at it briefly it looks like one can modify the catalog to subclass OFS.Cacheable and then use the ZCacheable_get, ZCacheable_set and ZCacheable_invalidate methods to interact

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-23 Thread Roché Compaan
On Fri, 2007-02-23 at 20:43 +0100, Dieter Maurer wrote: Roché Compaan wrote at 2007-2-23 18:44 +0200: ... Cool idea. I haven't done any coding involving OFS.Cache though. Looking at it briefly it looks like one can modify the catalog to subclass OFS.Cacheable and then use the ZCacheable_get,

Re: [Zope-dev] Re: Caching ZCatalog results

2007-02-23 Thread Lennart Regebro
On 2/23/07, Philipp von Weitershausen [EMAIL PROTECTED] wrote: It may require a bit of hacking the catalog, of course. Perhaps it's time to start thinking about componentizing the Zope 2 catalog to make such things easier in the future? Yup. It would also be interesting to look into making it