What to do about it? I think you've identified a new class of storage: Per-user. Temporary in that it can be deleted at any time. But persistent in that the OS should keep it around as long as possible.
More precisely, can be deleted any time the user does not have a "session" on the machine. It would lead to bugs if applications would have to test if the data is still there while they are running.
With a new class of storage should come a new location. Something like $HOME/.tmp/, where applications can store this cached data, but if space is tight the OS may remove it (eg. at boot) without repercussions.
Not under $HOME, please. As I noted, it is often backed-up and/or non-local storage (in some cases even a USB stick), and should not be wasted for caching. A convention like /var/tmp/caches/$USER would be preferable. If the convention were commonly used, standard library functions could be added to make a sub-directory under this user cache in a secure way, making usage as easy for application writers as using the $HOME directory.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds