Feature #8556
Updated by Tom Clegg almost 9 years ago
h2. Implementation
# Trash → set @<ExpiresAt>123</ExpiresAt>@ *and* create a marker (just an empty blob) named @trash/000000000123/hash@
# Untrash → unset @ExpiresAt@ *and* delete trash/000000000123/hash
# EmptyTrash → index @trash/*@ in order until the timestamps start being in the future. For each trash marker, get the modtime and ExpiresAt for the hash; if the data is still old and ExpiresAt is still set, delete it (otherwise do nothing); delete the trash marker in any case.
h2. Future work (defer)
When doing a full index (prefix=""), build two trash lists: a list of blocks whose metadata indicates that they are trash, and a list of trash markers. After sending the index response and closing the connection, delete any trash markers whose block metadata indicates that they are not trash.