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

Download database file only if it has changed since last sync #373

Open
maik-s opened this issue Jul 4, 2024 · 2 comments
Open

Download database file only if it has changed since last sync #373

maik-s opened this issue Jul 4, 2024 · 2 comments
Labels
refinement Something that can work/look better

Comments

@maik-s
Copy link

maik-s commented Jul 4, 2024

What can be improved?
KeePassium downloads the database file via WebDAV every time the app (or inapp overlay) is opened.

The solution you'd like
The WebDav server provides a precise timestamp of the last file change. Hence, KeePassium can use this timestamp to download the file only if the WebDAV server's timestamp is newer than the last synced one.

Alternatives you've considered
N/A

Additional context
N/A

@maik-s maik-s added the refinement Something that can work/look better label Jul 4, 2024
@keepassium
Copy link
Owner

Thank you for the suggestion.

I have been thinking about this for quite some time, and just wrote a long response why this is problematic:

  • Timestamps are not reliable enough, we also need checksums/hashes
  • WebDAV specification does not even mention checksums
  • This would only work on direct sync connections (timestamps from the Files app are often unreliable)

…and deleted it.

Even if this caching is limited to direct connections, it is worth implementing and having in the queue. Let me just generalize it from WebDAV :)

@keepassium keepassium changed the title WebDAV: Download database file only on if file has changed since last sync Download database file only if it has changed since last sync Jul 5, 2024
@keepassium
Copy link
Owner

Addressed in 1.53.154 (now in beta) via 3fc11ac.

If you keep the DB loaded in KeePassium, whenever you activate the app it will check whether the remote database has changed — and prompt you to reload, if so.

I understand this is different from your request (using a cache file instead of downloading the database at all), but this is the closes we'll get to it for the nearest future. Now KeePassium uses the remote database as a singular source of truth, and this will be so until we implement database merging. Then things will need to get a bit more flexible :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refinement Something that can work/look better
Projects
None yet
Development

No branches or pull requests

2 participants