Confirmed users
1,209
edits
m (using newly created SVN template) |
(parent callback explanation: bug 456090.) |
||
(One intermediate revision by the same user not shown) | |||
Line 33: | Line 33: | ||
// put a list ID on the list of lists to delete off the cache (6) | // put a list ID on the list of lists to delete off the cache (6) | ||
$this->Cache->markListForFlush("addon:{$this->id}"); | $this->Cache->markListForFlush("addon:{$this->id}"); | ||
// as always, remember to call the parent's callback before returning (7) | |||
return parent::afterSave(); | |||
} | } | ||
Line 63: | Line 65: | ||
=== 6: instant cache invalidation === | === 6: instant cache invalidation === | ||
At write time, we use markListForFlush() to mark one or more of the expiration list IDs for flushing. Each of these lists will be looped through and each contained object ID will be deleted from memcache. | At write time, we use markListForFlush() to mark one or more of the expiration list IDs for flushing. Each of these lists will be looped through and each contained object ID will be deleted from memcache. | ||
=== 7: parent callback === | |||
Our app_model contains code for the translation framework. Failure to call the parent's afterSave() callback after it was overwritten in the Addon model caused translations not to be saved ({{bug|456090}}), so... remember to do that. |