Delete user cache and history after 30 days
User story: I am an everyday user. I don't expect my local activity to persist forever, but some persistence is useful.
Suggested solution: Specify two categories of data, cache and history. Store them in well-known locations. Delete them as appropriate after 30 days (or some user-defined period).
User data are actual files created by the user. They must persist until the user decides to delete them.
User configuration is all settings defined by the user or on their behalf, stored in files in user space. They must persist until the user decides to delete them.
User caches are files created in user space to speed up applications. If deleted, the application will be a bit slower, but it will still function. They can be regenerated. For example, local copies of online resources.
Timestamped user history is any record of user activity with an associated timestamp. For example, browser history or application logs (in user space). If deleted, the user won't be able to recall previous actions.
Unstamped user history is any record of user activity without an associated timestamp. For example, a list of the last five opened files. If deleted, the user won't be able to recall previous actions.
User cache should be stored in
~/.cache/APPNAME. All files and folders under
~/.cachethat have not been touched in 30 days are deleted.
Timestamped user history should be stored in
~/.log/APPNAME. All files and folders under
~/.logcreated 30 days ago should be deleted.
Unstamped user history should be converted to timestamped user history. (How?)