/**
  * Get the temporary prepared edit stash key for a user
  *
  * This key can be used for caching prepared edits provided:
  *   - a) The $user was used for PST options
  *   - b) The parser output was made from the PST using cannonical matching options
  *
  * @param Title $title
  * @param Content $content
  * @param User $user User to get parser options from
  * @return string
  */
 protected static function getStashKey(Title $title, Content $content, User $user)
 {
     $hash = sha1(implode(':', array($content->getModel(), $content->getDefaultFormat(), sha1($content->serialize($content->getDefaultFormat())), $user->getId() ?: md5($user->getName()), $user->getId() ? $user->getDBTouched() : '-')));
     return wfMemcKey('prepared-edit', md5($title->getPrefixedDBkey()), $hash);
 }