[Erp5-dev] worklist - refresh

Jerome Perrin jerome at nexedi.com
Thu Dec 14 00:25:11 CET 2006


On Wed, Dec 13, 2006 at 07:45:48PM +0100, bartek wrote:
> Hello
> 
> How to make the system regenerate worklists? They seem to be cached in 
> some way, and when the objects change or I change the worklist settings, 
> I have to wait a few minutes until the changes are reflected in the 
> favourites dropdown.

Exactly, worklists are cached in a 300 seconds cache in
ERP5Type/patches/DCWorkflow.py

http://svn.erp5.org/?rev=11483&view=rev was an attempt to make this
cache duration flexible by allowing to specify the cache factory to use
for each worklist, but this patch was later reverted because the whole
top-bar (Favorites + Modules) is cached in page templates again, so
invalidating the cache for your worklist would have no effect.

> The same problem is when writing tests - the test case generates a
> worklist, but when checked, the worklist is always empty, so every
> test fails.

For now, there's no other way than clearing the default cache manually
when running your test cases, or to add some "get a coffee" steps ;)

jerome




More information about the Erp5-dev mailing list