if you create a document it gets its lastmodified entry. now if you call for editing in the same second as it was created the last modified entry won't get updated because the lastmodified entry just uses seconds and not milliseconds. so for the cache the the fresh created document is still the one with the newest lastmodified entry so the cache won't look for some changes and delivers the outdated document. a possible way to get around this would be to add Packages.java.lang.Thread.currentThread().sleep(1000); in the editDocument function of edit-document.js. does anyone have a better idea? cache | new | | still | | still | | doc 000 |--¬ | doc 000 | | doc 000 | ---------------------------------------------------------------------- timeline 000 | 010 | | | 020 | | 030 | ---------------------------------------------------------------------- action create new doc | request for edit save doc | | | | ------------------------ | V request some time later.
Created attachment 17547 [details] workaround fot this bug waits before saving the doc untill it's in the next second.
Thanks for the patch. I have one question: the patch uses "active waiting", that means the cpu load will be high during the waiting period. Is there nothing like sleep() in flowscript? (Maybe an easier workaround would be to wait 1 second in your test before you click the save button.)
(In reply to comment #2) > Thanks for the patch. > I have one question: the patch uses "active waiting", that means the cpu load > will be high during the waiting period. Is there nothing like sleep() in flowscript? I guess you can just create an object and invoke sleep() on it ... > (Maybe an easier workaround would be to wait 1 second in your test before you > click the save button.) +1, since the patch is also just a workaround.