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

Add a function that can reload config files #64

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jan 9, 2024

  1. add function that can clear cached config files

    Once the first call to `Get()`, `GetStrict()`, `GetAll()`,
    or`GetAllStrict()` has been made, the contents of the config files will
    be cached for all future calls to any of those functions. This can be
    frustrating if the user wants to capture changes to the config file that
    were made externally. This
    change adds the `ClearCachedConfigs()` function to provide control over
    that.
    oneirocosm committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    ba0d247 View commit details
    Browse the repository at this point in the history
  2. change ClearCachedConfigs to ReloadConfigs

    Clearing cached data is somewhat vague and could be more confusing to
    users who are not familiar with this library. But Reloading the config
    data is very straightforward. For this reason, the ability to clear the
    cache has been replaced with the ability to reload.
    
    The reload simply clears the cache and then loads the contents again.
    
    Additionally, this contains a bug fix that ensure the loadConfigs
    pointer is set to a non-null value before it is used.
    oneirocosm committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    ea2c71d View commit details
    Browse the repository at this point in the history
  3. add tests for reloading ssh config files

    This adds 2 tests. The first checks that ssh config data is cached and
    does not update if the file changes afterward. The second checks that
    the `ReloadConfigs()` function will discard the cached data and load the
    current config file contents.
    oneirocosm committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    36c8da3 View commit details
    Browse the repository at this point in the history