[Zope] How to specify caching for ZSQL methods on file system

2006-03-02 Thread Yuan HOng
I have some ZSQL methods written on the file system using FSDV. In ZMI
I can not find the 'Advanced' tab usually available for ZSQL methods
in ZODB for specifying the caching properties of the ZSQL method.

Can anyone give some clues as how to do this for ZSQL on FSDV? I
suppose I might need to write some *.metadata file to specify these
properties using FSDV?

--
Hong Yuan

大管家网上建材超市
装修装潢建材一站式购物
http://www.homemaster.cn
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to specify caching for ZSQL methods on file system

2006-03-02 Thread Martijn Pieters
On 3/2/06, Yuan HOng [EMAIL PROTECTED] wrote:
 Can anyone give some clues as how to do this for ZSQL on FSDV? I
 suppose I might need to write some *.metadata file to specify these
 properties using FSDV?

You must specify the cache settings in the .zsql file itself, using a
dtml-comment block at the top. Here is an example:

dtml-comment
title: Retrieve the per_id of a given uid
connection_id: portal_cvix
arguments: uid
cache_time: 10
/dtml-comment

'cache_time: 10' sets the caching time to 10 seconds.

--
Martijn Pieters
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to specify caching for ZSQL methods on file system

2006-03-02 Thread Stefan H. Holek

You are close ;-)
The info goes into a dtml-comment block at the start of the file.

dtml-comment
title: Foo
arguments: foo bar
max_rows: 1000
max_cache: 100
cache_time: 60
/dtml-comment

...

Stefan


On 2. Mär 2006, at 15:15, Yuan HOng wrote:


I have some ZSQL methods written on the file system using FSDV. In ZMI
I can not find the 'Advanced' tab usually available for ZSQL methods
in ZODB for specifying the caching properties of the ZSQL method.

Can anyone give some clues as how to do this for ZSQL on FSDV? I
suppose I might need to write some *.metadata file to specify these
properties using FSDV?

--
Hong Yuan


--
Anything that happens, happens.  --Douglas Adams


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )