(Wed, Dec 05, 2007 at 04:33:33PM +0100) Jaroslav Lukesh wrote/schrieb/egrapse: > I have RAM-cached page that looks for data from SQLdb. For error > suppression (yea, I use MSSQL which make sometime unbelievable SQL > error with the same errorless query) I use try-except wrapper, but in > some cases page is cached without db results for a looooong time. > > I know how to invalidate already rendered page from a ram cache, but > I does not know how to temporal disable RAM-cache during rendering of > that page.
If with the ramcached "page" you mean a ZPT, the answer is "don't do this". Please refer to the RAM Cache documentation why not to cache complete ZPTs. The proper setup is to cache only the method that returns the data, if you do that you can look at the result and/or check if any exceptions were raised and decide if you update the cache or not. When you look at the example code on http://betabug.ch/blogs/ch-athens/635 you see immediately where you can decide to do self.ZCacheable_set or not. Regards, Sascha _______________________________________________ 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 )