Why using a Trashcan and not immediately delete a page?

Snap! is being developed in a way which is quite different from many of the existing CMS.

One of the features is to move pages being deleted to a trashcan, in effect, not actually deleting the data from the Cassandra cluster, but keeping it in a different place.

Actually, the "move page" feature in Snap! does not move anything, it makes a copy of the existing data in the specified destination and marks the old data as hidden. It also links the old and new data together and time stamp them.

There are several reason for doing all of that work. First of all, the Cassandra cluster does not automatically delete your data properly. If a node is down at the time the delete happens, the data survives in that node. When the node comes back to life, the data may be resurrected! (see details here.) So it is better for such important deletions to occur in a very controlled manner.

The second reason is obvious: the user who deletes something may later regret it. Having the data still at hand, at least for a while, is generally a really good idea. The trashcan will survive for a while, but it can eventually be deleted using our trashcan backend.

The interesting feature in that one is that the data that was moved is deleted first. After a few days, the trashcan data can be deleted. If the data that was moved still exists at the time the trashcan data is to be deleted, then that data is re-deleted and the trashcan deletion schedule pushed back further. That way, the deletion of a page is not likely to ever fail in Snap!

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly