Comments (6)
Maybe:
~/Library/Caches/lima
: when$LIMA_HOME
is unset or set to the default value~/Library/Caches/lima-<hash of LIMA_HOME>
: when$LIMA_HOME
is set to a non-default value
from lima.
~/Library/Caches/lima-<hash of LIMA_HOME>
: when$LIMA_HOME
is set to a non-default value
I prefer the directory names to be human-readable and not just some hash magic. Right now I can do this:
$ cd ~/Library
$ fd rancher-desktop
Caches/rancher-desktop
State/rancher-desktop
Preferences/io.rancher.rancher-desktop.plist
Preferences/rancher-desktop
Saved Application State/io.rancher.rancher-desktop.savedState
Application Support/KeyCue/Key Counts/rancher-desktop.plist
Application Support/KeyCue/Application Icons/rancher-desktop.tif
Application Support/rancher-desktop
Application Support/CrashReporter/rancher-desktop_BB91A231-8B81-5794-8293-FC46153BEB40.plist
So if there was a rancher-desktop specific lima cache directory, then I would prefer that it would be similarly discoverable. If I could, I would set LIMA_CACHE=$HOME/Library/Caches/rancher-desktop/lima
.
If you are really opposed to another env var, then maybe putting the cache under $LIMA_HOME/_cache
would feel better to me. I'm still undecided on whether not using ~/Library/Caches
would bother me. But then we are not using ~/Library/Logs
either, so I don't know.
Normally I would rather have LIMA_HOME/cache
and $LIMA_HOME/instances
, but that would eat up even more previous characters from the max socket name length. FWIW, this is also very similar to the layout that minikube is using. 😄
Somehow I come back to the position that this is all unnecessary complexity, and just providing a second env variable to let an embedding application decide if it wants to share the lima cache or not would be both the simplest and the most flexible thing.
Note that for Rancher Desktop this discussion is mostly hypothetical because it likely won't be using the lima cache. It already contains logic for caching different k3s versions. That code is needed on Windows, where we are using WSL2. And having control over the caching logic also allows for better error reporting when something goes wrong.
from lima.
Does macOS provide any tool for cleaning up ~/Library/Caches
as in Windows Disk Cleanup?
(AFAIK not)
If not, I guess there is no advantage in using ~/Library/Caches
, and we can just use $LIMA_HOME/_cache
from lima.
Does macOS provide any tool for cleaning up
~/Library/Caches
as in Windows Disk Cleanup?
I'm not aware of any tool either. I just tested "Safe Boot", which does clean up system caches, but it did not touch ~/Library/Caches
(or /Library/Caches
).
On other idea I had: if lima starts using a config file, e.g. $LIMA_HOME/config.yaml
, then this could be another mechanism to customize this without requiring an extra env variable. And it would just default to ~/Library/Caches/lima
if the config file doesn't exist, or the cache setting hasn't been provided. But maybe again making it needlessly complicated?
from lima.
I just had another thought about the cache directory: lima could continue to use a shared ~/Library/Caches/lima
directory unless the user (or embedding application) explicitly creates a $LIMA_HOME/_cache
directory themselves.
This provides additional flexibility and leaves the default location as-is.
The documentation should mention that it is the responsibility of the user (or embedding application) to exclude the $LIMA_HOME/_cache
directory from Time Machine. The default location is automatically excluded:
$ tmutil isexcluded ~/Library
[Included] /System/Volumes/Data/Users/jan/Library
$ tmutil isexcluded ~/Library/Caches/
[Excluded] /System/Volumes/Data/Users/jan/Library/Caches
$ tmutil isexcluded ~/Library/Logs
[Excluded] /System/Volumes/Data/Users/jan/Library/Logs
This raises the question if ~/.lima
should be excluded by default, as backing up 100GB files every time there is a change is rather impractical. But I just checked VMWare Fusion and VirtualBox, and neither one excludes their VM directories automatically and leave it to the user. So maybe this too should just be documented instead?
from lima.
SGTM
from lima.
Related Issues (20)
- attach and mount external drive (ssd / hdd) via usb [eg Ext4] HOT 2
- Lima's X11 forwarding breaks after a MacBook goes to sleep HOT 10
- Ping is providing a corrupted response HOT 1
- user-v2: ping shows replies even for non-reachable addresses HOT 1
- vz mode now prints `WARN[0001] vmType vz: ignoring [TimeZone] ` on every start up HOT 1
- pkg/network/commands_tests broken for non-default dev machines
- External driver, for cloud and physical HOT 3
- limactl start assumes that /bin/bash is present on host HOT 6
- Document how to boot a VM into rescue mode for troubleshooting
- [User name: `admin`] Waiting for the essential requirement 1 of 4: "ssh" HOT 5
- Unable to connect host after restart instance HOT 7
- Add templating support for cloud-init in lima.yaml HOT 2
- Allow to update the packages at boot HOT 4
- Certain node.js/amd64 workloads cause container to become unresponsive/100% CPU when using Rosetta HOT 1
- Support Go 1.22 HOT 1
- v0.20 planning HOT 4
- Add CLI command to generate launchd units for macOS hosts (systemd units for Linux hosts) HOT 7
- Split help commands into Basic and Advanced and Instance command groups HOT 7
- Writes to virtiofs (linux host w/ virtiofsd) filesystem fail even when using --mount-writable HOT 1
- virtserialport mechanism to communicate with guestagent doesn't work reliably
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lima.