[Zope] ZSQL Cacheing

Martijn Pieters mj@antraciet.nl
Thu, 11 Nov 1999 07:58:24 +0100


At 03:53 11-11-99 , Rob Page wrote:
> > Do the queries  i.e.   sql.get_skin(username='default')
> > cache only for that given set of inputs? Or do they cache
> > regardless of the inputs? Because we have seen some evidence that the
> > result returned doesn't always change even when the username does and
>it _should_ have
> > to go look it up again.
>
>IIRC from earlier investigations and presentations from Jim et al the
>cacheing data structure is keyed on the rendered string of SQL that is
>sent to the RDBMS.  There are probably some zany dynamic SQL queries
>that could render the same query string for different input values.  If
>the rendered string is different then the expected behavior is that the
>cache would miss causing Zope to reissue the query to the RDBMS.

Yup, caching is keyed on the arguments.


--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| T: +31 35 7502100 F: +31 35 7502111
| mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
---------------------------------------------