<br><tt><font size=2>Gary Poster &lt;gary@zope.com&gt; wrote on 07/31/2008
01:07:39 PM:<br>
<br>
&gt; I'm the primary zc.catalog author.<br>
&gt; <br>
&gt; He is running read-only, so savepoints shouldn't be very pertinent.<br>
&gt; <br>
&gt; The original poster is correct that the cache is cleaned out at &nbsp;<br>
&gt; transaction boundaries (or savepoints, as Alan said).<br>
&gt; <br>
&gt; I don't have experience with running the db in readonly mode in &nbsp;<br>
&gt; production. &nbsp;That said, if you have obvious boundaries for your
&nbsp;<br>
&gt; searches, I suspect that beginning a transaction at the boundary would
&nbsp;<br>
&gt; probably do the trick, and also work (with invalidations and the like)
&nbsp;<br>
&gt; if you ever have a readonly connection to a ZEO database server that
&nbsp;<br>
&gt; is getting updates from another source.<br>
&gt; <br>
&gt; While it's interesting to contemplate the knob that Alan mentioned,
&nbsp;<br>
&gt; I'm reasonably confident that this logic belongs in the app, not the
&nbsp;<br>
&gt; index or catalog.<br>
</font></tt>
<br><tt><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; I was thinking
it this logic would be in the ZODB.DB since it (or something else in ZODB)
is already responsible for clearing out the cache at transaction boundaries,
and it should be aware the FileStorage is read_only. &nbsp;But it doesn't
sound like it is. &nbsp;Also, it sounds like the cache is not for keeping
any objects in memory to avoid rereading from disk (excepting those changed
that need to be written in the next transaction), but only to keep some
objects in memory across transaction boundaries.</font></tt>
<br>
<br><tt><font size=2>&nbsp; &nbsp; &nbsp; &nbsp; For now I've put
it into the &quot;app&quot; (really, a thrown-together script) to call
cacheMinimize on the DB object after dealing with the results of each search.
&nbsp;If we were going to stick with ZODB, I'd work on handling it in my
own code, but we're moving away from ZODB (for managerial reasons).</font></tt>
<br>
<br><font size=2 face="sans-serif">-- <br>
Anthony Foglia<br>
Princeton Consultants<br>
(609) 987-8787 x233</font>