Peter Reitsma <[EMAIL PROTECTED]> wrote:
>    We are running into a problem with a JSP in which at some stage a field is
>    updated and later on in the same JSP is requeried through a <mm:related>
>    tag. The requeried value is not shown as updated.
>    When the entire JSP is executed again, through a refresh, the correct
>    value is shown. Also, if we clear the multilevel cache, just before
>    running the JSP, the behaviour is correct.
>    This leads us to the conclusion that the MultiLevel cache is not updated
>    correctly when one of the nodes in its nodepath is changed. Or are we
>    making some other mistake ? Why is it that the value is shown correctly
>    only after refreshing ?
>     
>    Is this a know problem ? We are running on MMBase 1.6.4.

There was a known problem in 1.6 yes. Invalidating of caches happens in a
seperate thread, so if you do a query immediatetly after un update you can
still have the cached result, because this other thread is not yet ready
with it.

In 1.7 I have fixed this (I can't immediately find the excact bugnummer
right now) , becasue there every change in MMobjectBuilder invalidates the
cache itself, so does not return until after the invalidation of the cache.


So, the multilevel cache is invalidated correctly, also in 1.6, it can only
give a sligth delay, but this is fixed in 1.7.
 
>    We found an elegant workaround by adding a constraint attribute to the
>    <mm:related> tag with a random value... 
>        <% long random = new Date().getTime();
>              String constraints = "" + random + "=" + random;
>        %>
>        <mm:related path="posrel,data,related,datatypes"
>    constraints="<%=constraints%>" orderby="posrel.pos" directions="up">
>    Thanks in advance for any help,


That's hardly elegant, if I may say :-)


 Michiel




-- 
Michiel Meeuwissen       |
Mediapark C101 Hilversum | 
+31 (0)35 6772979        |  I hate computers
nl_NL eo_XX en_US        |
mihxil'                  |
 [] ()                   |

Reply via email to