Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
4.1.3, 4.1.4, 4.2.0
-
None
Description
When you publish an object the system will - among others - do the following thing:
clearObjectViewCache
generateObjectViewCache (if previewcache enabled i assume)
registerSearchObject
createNotificationEvent
removeTemporaryDrafts
post_publish
The objects does not actuallay get published before (after) the last step, but after clearobjectviewcache the cache is expired. If a customes views the object between clearObjectViewCache and the object is actually published, the system will render a new compiled template and store it - but with the old content. The cache is now not expired, and the system will continue to display the old content.
With delayedindexing off and/or a long post_publish workflow time, this will hapen quite often.
It will continue in the left three from http://share.ez.no/articles/ez-publish/ez-publish-knowledge-series-stale-cache-or-how-caches-in-ez-publish-4.1-are-handled-in-a-smarter-way/%28page%29/2
Steps to reproduce
Testet with standard eZ 4.2.0 from http://ez.no/download
It can be reproduced in the following way:
To simulate that registersearchobject takes af realy long time add
sleep(30);
on line 539 (just after static public function registerSearchObject( $objectID, $versionNum ) in
kernel/content/ezcontentoperationcollection.php
Steps:
1 Backend, edit frontpage
2 Change anything, example - add "test" to "Left column:"
3 Push publish
4 wait a few seconds
5 Watch the frontend - old content will show
6 Wait
7 watch the frontend - old content will still show
To show the cache while publishing is the problem, do it again - but wait until the object is fully published, add more info, view the frontpage, the page will now be updated.
The clearobjectviewcache should possibly be done after the object is fully published.
Best Regards
Adam Helms