On Wed, Jun 25, 2008 at 07:12:53PM +0100, Miles wrote:
Kereoz wrote:
On Wed, Jun 25, 2008 at 1:13 PM, Andreas Jung <lists@zopyx.com> wrote:
As you can see from the HTML code: something like
app.Control_Panel.Database.<name of storage>.manage_minimize()
should work. I was thinking about the zope command line tools such as zopectl or so.
I don't think doing it in zopectl will do what you want. AFAIK, the cache that method minimizes is the in-memory object cache. zopectl runs in a separate process, which will have its own cache; so calling manage_minimize() in a zopectl script will not affect the running Zope server. Instead you could write a script that uses wget or python's httplib or similar to connect to the running Zope server and send the same request that submitting the form in the ZMI would send. None of this has anything to do with caches on disk, so I may be misunderstanding what you want. The only disk cache I know of that's relevant to ZODB is the ZEO client cache, which I don't believe is affected by manage_minimize(). I don't think there is any API for cleaning stuff out of it.
You could also use something like
$ PYTHONPATH=/usr/local/Zope-2.9.6/lib/python /usr/local/Zope-2.9.6/bin/zeopack.py -p $PORT -S $STORAGE -d $PACKDAYS
That's for packing the storage, which is totally different. -- Paul Winkler http://www.slinkp.com