Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should /var/cache/regreet/cache.toml be moved to /var/lib/regreet/state.toml? #33

Open
Rosuavio opened this issue Jul 12, 2023 · 5 comments · May be fixed by #81
Open

Should /var/cache/regreet/cache.toml be moved to /var/lib/regreet/state.toml? #33

Rosuavio opened this issue Jul 12, 2023 · 5 comments · May be fixed by #81
Labels
enhancement New feature or request

Comments

@Rosuavio
Copy link

I have been investigating what directories are safe/inconsequential to have on a tmpfs, and the docs I am finding around FHS point toward the files in /var/cache being very safe to delete with the largest resulting consistences being that programs would have to take time to recompute the data. Deleting /var/cache/regreet/state.toml will "lose" in-recalculate-able values that will require user input to re-obtain. Also deleting the file will have the very visible consistences to the user.

Since the file is more state-full maybe it should live under /var/lib/ is some form?

https://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA
https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html

@rharish101
Copy link
Owner

While the lost values are technically incalculable, they only serve as a minor convenience, and ReGreet is perfectly usable if it's deleted. Is the requirement for being able to recreate the cache actually necessary? The second link doesn't suggest that.

@Rosuavio
Copy link
Author

That's a fair point, but at the same time the docs for /var/lib don't seem to specify that the state information stored there needs to be considered essential for the operation of the program, or if it's safer to delete or not. So /var/lib seems equally or more appropriate for this data as it's less prescriptive on being able to recalculate its contents while saying it's a place specifically for application state information (which seems to be the contents of the file).

@Rosuavio
Copy link
Author

This link may be more official and it specifies...

The application must be able to regenerate or restore the data. Unlike /var/spool, the cached files can be deleted without data loss.

Deleting that file would have a noticeable impact, so I would consider deleting it "data loss"

@Rosuavio
Copy link
Author

If changing the default is desirable I can make a PR when I have an opportunity.

@rharish101
Copy link
Owner

Okay then, go ahead!

@rharish101 rharish101 added the enhancement New feature or request label Jul 27, 2023
rharish101 added a commit that referenced this issue Aug 4, 2024
- Resolves #33.
- The ReGreet cache is more of a state, especially with the skipping
  selection option.
rharish101 added a commit that referenced this issue Aug 4, 2024
- Resolves #33.
- The ReGreet cache is more of a state, especially with the skipping
  selection option.
- NOTE: This does break backwards-compat.
@rharish101 rharish101 linked a pull request Aug 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants