Page MenuHomePhabricator

Delete edit recovery data after 30 days
Open, Needs TriagePublicFeature

Description

Feature summary:

When saving any page, that page's edit recovery data is deleted. This is a good point at which to also delete any out of date data for other pages.

Pages have a lastModified field in their recovery data, which can be used to determine the last time a page was opened for editing. If a page hasn't been opened for editing within 30 days, its data should be deleted.

Acceptance criteria:

  • Pages that have not been edited for 30 days are removed from the edit recovery indexedDB storage.

Use cases:

  • As a user, I don't want my browser's storage filling up with unwanted recovery data for pages that I've not edited in a long time.

QA notes:

Event Timeline

I would recommend implementing a generic expiry API, like we did with localStorage in T121646.

Yes, definitely a good idea. I've been investigating doing that, and it has been a bit of a trade off between building something now for this use case, and building a framework that could work for future use cases as well (without actually knowing what those are, at the moment — which is why I've hesitated so far).

We'll look at moving the generic bits of the storage layer to a central place e.g. mediawiki.indexedDB. mw.storage has an optional expiry, but we could make it mandatory probably.

mw.storage has an optional expiry, but we could make it mandatory probably.

Yes - it's only optional for backwards compatibility.

Change 958986 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/core@master] editRecovery: Delete edit recovery data after 30 days

https://gerrit.wikimedia.org/r/958986

Change 958986 merged by jenkins-bot:

[mediawiki/core@master] editRecovery: Delete edit recovery data after 30 days

https://gerrit.wikimedia.org/r/958986