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. --Rob
On 11/10/99 9:53 PM, Rob Page at rob.page@digicool.com wrote:
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.
Thers also aging... if you use <dtml-sqlgroup> a lot, you can easily do this. At some point we're thinking about tying this into statement handles as well... maybe really soon. Chris -- | Christopher Petrilli Python Powered Digital Creations, Inc. | petrilli@digicool.com http://www.digicool.com
On Wed, Nov 10, 1999 at 09:53:06PM -0500, 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.
No the string would be the same... Hmmm... Ok, that mustn't be it, must be some other caching level that's stuffing up. (Problem with having Zope+Database+Proxy+Browser... Too many fingers messing about with caching.) I'll try to find more specific examples of what's happening and come back to it then.
--Rob
-- Evan ~ThunderFoot~ Gibson ~ nihil mutatem, omni deletum ~ May the machines watch over you with loving grace.
participants (3)
-
Christopher Petrilli -
Evan Gibson -
Rob Page