Previously if an exception was thrown when creating the description
page, the old (negative) memcached entry would not be purged, and
the file would appear not to exist until 24 hours later.
This way, as soon as we have the image row committed to db, we
change the memcache entry, so memcache of image row always looks
like actual image row.
Bug: 32551
Change-Id: I9c260e9a4a1e0d6ade1771542dd834f969904cef
# to after $wikiPage->doEdit has been called.
$dbw->commit( __METHOD__ );
+ # Save to memcache.
+ # We shall not saveToCache before the commit since otherwise
+ # in case of a rollback there is an usable file from memcached
+ # which in fact doesn't really exist (bug 24978)
+ $this->saveToCache();
+
if ( $exists ) {
# Invalidate the cache for the description page
$descTitle->invalidateCache();
wfProfileOut( __METHOD__ . '-edit' );
- # Save to cache and purge the squid
- # We shall not saveToCache before the commit since otherwise
- # in case of a rollback there is an usable file from memcached
- # which in fact doesn't really exist (bug 24978)
- $this->saveToCache();
if ( $reupload ) {
# Delete old thumbnails