Are the data stored with the tempstore.private and tempstore.shared services expected to be removed when the user account is deleted? Both the tempstore.private and tempstore.shared services store data which have an associated owner; for logged-in users, that is the user ID.

When an account is deleted, are the data having that user ID as owner removed?

I looked at User::postDelete(), but there isn't code for that.

public static function postDelete(EntityStorageInterface $storage, array $entities) {
  parent::postDelete($storage, $entities);
  $uids = array_keys($entities);
  \Drupal::service('user.data')
    -&gt;delete(NULL, $uids);
}


It could be I didn't look at the correct class, or the code to delete those data is still missing from Drupal core.

Should I expect the data stored with the tempstore.private and tempstore.shared services be immediately deleted after a user account is deleted?
The user's temp storage deletion isn't attached to the user deletion process.

If you look at the class, PrivateTempStoreFactory, instantiated for tempstore.private &amp; tempstore.shared, you can see that the class has an expire property that determines the storage's TTL (in seconds).

These services are instantiated with an expire value of defined by parameters:tempstore.expire in core.services.yml, with a default of 604800 seconds (1 week), so the temp storage will expire 1 week after its creation.