Use standard cache directory by default #1963
Replies: 1 comment
-
Hi, sorry for the late reply. I think there is some merit to using the system's cache folder, since as you say then the host OS will identify it as such. However, the cache was also designed so it could be persistent if users wanted it to be, i.e. some users with heavier sequences might not want the cache to be considered temporary/transient, or users might want to move the cache along with a project so they don't have to re-cache on another system. However, a counterargument to that is that if users care about things like that, it's likely they'd set a custom cache location anyway (setting it to a specific drive, or to sit next to the project, etc.) So I'm open to it, however there are some minor concerns/reasons it was designed the way it is. What do you think? |
Beta Was this translation helpful? Give feedback.
-
Hi!
Would you be open to changing the default media cache directory to use the standard
QStandardPaths::CacheLocation
? Having it configurable, of course, makes this possible already, but I feel like this would be a more sensible default.A big reason I'm suggesting this is that many disk cleaning tools (as well as users) will empty the user cache directory in order to free up space and currently, Olive's cache needs to be hunted down separately.
The change would (from my understanding) be quite simple, impacting only this one line:
olive/app/render/diskmanager.cpp
Line 172 in f85c41a
I'm guessing some migration path would need to be provided, which would complicate things a bit, but probably wouldn't cause much trouble. The cleanest way to do this would probably be to make the clear cache function check for the existence of the old dir and delete it as well. This way, the directory wouldn't stay around forever, but it would avoid the (admittedly small) cost of checking and deleting it on startup, which is the other option commonly used in such scenarios.
I'm happy to make a PR and do the required testing on Linux and Windows, but I don't have a macOS install to test on.
Beta Was this translation helpful? Give feedback.
All reactions