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

Upload history should be qualified as cache data #568

Open
JakeSmarter opened this issue Oct 13, 2022 · 1 comment
Open

Upload history should be qualified as cache data #568

JakeSmarter opened this issue Oct 13, 2022 · 1 comment

Comments

@JakeSmarter
Copy link

JakeSmarter commented Oct 13, 2022

MAPILLARY_UPLOAD_HISTORY_PATH = os.getenv(
"MAPILLARY_UPLOAD_HISTORY_PATH",
os.path.join(
constants.USER_DATA_DIR,
"upload_history",
),

This data is not essential for the app to work. It is neither an app setting, a configuration, nor a preference. It can also be recreated at any time. The upload history is not tied to a specific machine either because uploaded imagery could have been pulled by the local machine from anywhere. Thus, it should not need to roam. The upload history can become huge very quickly for users frequently uploading lots of sequences. No one really wants to roam this stuff around over networks. Furthermore, for how long does this “history” (has to) live?

Please, see the XDG Base Directory Specification for qualifying app data. The same logic applies to basically any other OS. So please, use appdirs.user_cache_dir for upload history data. Yeah, you can override MAPILLARY_UPLOAD_HISTORY_PATH but it should be set to a sane default initially. If a user really wants to keep track of uploaded sequences over multiple machines or wants to keep the upload history indefinitely then they should configure MAPILLARY_UPLOAD_HISTORY_PATH to their desire.

@JakeSmarter
Copy link
Author

I am guessing this also ties in to #524.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants