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

Fix missing cached database when storage is low #348

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Trekky12
Copy link
Contributor

The cached database is stored in a temporary folder which could be cleared at any time
(https://pub.dev/documentation/path_provider/latest/path_provider/getTemporaryDirectory.html). Unfortunately sometimes the cached database is no longer available when the app is opened in offline mode.

This PR changes the directory for the cached database to the Application Support Directory
(https://pub.dev/documentation/path_provider/latest/path_provider/getApplicationSupportDirectory.html).

The Application Documents Directory is not used because this directory is already used for local databases and queried when opening local databases.
Since the cached version of databases should not be selected manually the Application Support Directory was chosen.

This PR closes PR #340 which is no longer needed.

The cached database is stored in a temporary folder which could be
cleared at any time
(https://pub.dev/documentation/path_provider/latest/path_provider/getTemporaryDirectory.html).
Unfortunately sometimes the cached database is no longer available when
the app is opened in offline mode.

This commit changed the directory for the cached database to the
Application Support Directory
(https://pub.dev/documentation/path_provider/latest/path_provider/getApplicationSupportDirectory.html).

The Application Documents Directory is not used because this directory
is already used for local databases and queried when opening local
databases.
Since the cached version of databases should not be selected manually
the Application Support Directory was chosen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant