Hi, I am looking for a general advice for a caching-strategy for zsql-methods: I have to execute 2 sql-queries in sequence: Query one (Q1) limits the table-data to a certain amount. This query does not change often and should be cached. Query two (Q2) selects a part of the results of query one. Q2 is dynamic. What is the best strategy (performance, data-transfer) to cache Q1in ZOPE if I can not use views or stored procedures on the db-side? -- thanks for any hint, Sebastian K. (Please answer to my mail address directly as I am currently not subscribed to this list, thanks)
Sebastian Krollmann wrote:
Hi,
I am looking for a general advice for a caching-strategy for zsql-methods: I have to execute 2 sql-queries in sequence: Query one (Q1) limits the table-data to a certain amount. This query does not change often and should be cached. Query two (Q2) selects a part of the results of query one. Q2 is dynamic.
What is the best strategy (performance, data-transfer) to cache Q1in ZOPE if I can not use views or stored procedures on the db-side?
-- thanks for any hint, Sebastian K.
Hard to say whats best since I dont know the details of your application, but what about the built-in ZSQL Caching? If you are working with Python Products, you could also wrap your ZSQL Methods with custom code which implements the OFS.Cache.Cacheable interface (I do this for flexibility). Also, theres Dieter Maurers ZSQL Product: http://www.dieter.handshake.de/pyprojects/zope/CCSQLMethod.html -- cant comment on it since I havent used it, though. - peter.
participants (2)
-
Peter Sabaini -
Sebastian Krollmann