Skip to content

Implement database caching and settings associated with it #31

Description

@mf366-dev

Description

Essentially, players could pick from the following options, regarding the caching of the database:

1. Always check, but never cache (always use the Internet to grab the most recent data) => NOT RECOMMENDED

  1. Always check and cache (always use the Internet to check whether a more recent DB is available; if not, revert to cached; if yes, cache it)
  2. Check daily (use the Internet daily to check and cache or use cached)
  3. Check weekly
  4. Check monthy
  5. Check trimesterly
  6. Check semesterly
  7. Check yearly
  8. Never check, always cache (use whatever is cached, no matter how old it is) => NOT RECOMMENDED

I think a commandline flag like --check-now (-c) to check and cache could be useful. Essentially it forces the game to check for DB updates on boot regardless of the setting you have chosen UNLESS you have no Internet access.

Note that the first time you boot up the game, you're gonna be prompted to download the database. If you pick "No, thanks" or you have no Internet access, you'll be unable to play the game whatsoever.

Also be careful with Option 1 as if you have no Internet access it doesn't let you play.
Be careful with Option 9 as well, as if you have nothing cached, it WON'T check and you have to run with -c OR download the database yourself (not recommended).

For all the other options if you have no Internet access but it was supposed to check at that moment, it'll abort, warn you about it and use whatever is cached.

If for any of these options, except 1 and 9, you clear the cache and then boot up the game, it'll check and cache even if it was not supposed to do it at that moment.

Tasks

  • Implement each of the settings
  • Implement -c commandline flag
  • Test each of the settings for ALL possible edge cases
Pinned by mf366-dev

Metadata

Metadata

Assignees

Labels

EnhancementNew feature or request

Projects

Status
Testing

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions