fedora-silverblue / issue-tracker

Fedora Silverblue issue tracker
https://fedoraproject.org/atomic-desktops/silverblue/
126 stars 3 forks source link

Add a cache-cleaner to Kinoite / Silverblue #437

Closed boredsquirrel closed 1 year ago

boredsquirrel commented 1 year ago

Is your feature request related to a problem? Please describe. A Problem can be if cache older than x days clutters the system.

Describe the solution you'd like A tool cleaning the unused cache on shutdown, so that no running application is affected (even though its older than x days so they wouldnt be anyways)

Here is a solution for it using a systemd service

Describe alternatives you've considered Adding it manually.

miabbott commented 1 year ago

What is the exact problem of having the older cache present on the system?

I would be interested in knowing those details before suggesting any changes to either Kinoite/Silverblue.

travier commented 1 year ago

Application should write their cache in a tmpfs / temporary folder if they expect it to be cleaned up on reboot.

Otherwise, arbitrarily cleaning cache has no benefits.

boredsquirrel commented 1 year ago

Dealing with misbehaving applications and Flatpaks using their own cache, which is not deleted as far as I know.

This is a workaround for a different problem. I know the /tmp should be used but its not, apart from some system applications in my experience.

Personally I had 4GB or cache only in the ~/.cache folder, which may be considered as bloat.

Maybe a better solution would be integrating this functionality into DEs with a storage limit warning and Interface.

travier commented 1 year ago

Arbitrarily deleting the entire cache will penalize applications that use it correctly. If an application behaves incorrectly then you need to identify it and then file a bug for it.

boredsquirrel commented 1 year ago

Yes this is true, uncomplete solution the apps themselves should do.

I know on Android in the past is was like that, nowadays it works and this is not needed.

For the meantime I will use this anyways as a fallback and analyse what bundles up cache and do issue reports.