Discussion:
[Erp5-dev] worklist - refresh
bartek
2006-12-13 18:45:48 UTC
Permalink
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. 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.

Thx
Bartek
Jerome Perrin
2006-12-13 23:25:11 UTC
Permalink
Post by bartek
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.
Post by bartek
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

Loading...