Skip to content

Added cache management#72

Merged
cezmunsta merged 1 commit into
masterfrom
cache
Sep 27, 2021
Merged

Added cache management#72
cezmunsta merged 1 commit into
masterfrom
cache

Conversation

@cezmunsta
Copy link
Copy Markdown
Owner

Previously, connections were only cached by specifically requesting
them via commands such as connect, write, etc. Purging was
possible via the purge command, but only the entire cache could
be purged, which isn't always desirable.

A new command, cache, has been created with subcommands for
supported operations on the cache, which currently is limited to
populating and purging.

  • Added cmd.cacheCmd, renamed cmd.purgeCmd to
    cmd.purgeCachCmd and moved it to be a subcommand
  • Added flags to purging so that the operation can be forced (-f)
    so that confirmation can be bypassed, as well as now being able to
    specify a specific connection (-c) to limit purging
  • Added cmd.populateCacheCmd that will iterate the full list of
    available connections and wriute each to the cache. This allows for
    a user to populate the entire set of connections at any given point
    and thus be able to avoid issues where Vault might be unavailable
    and an uncached connection is requested
  • Updated tests to include populatting and purging connections

Resolves #71

Previously, connections were only cached by specifically requesting
them via commands such as `connect`, `write`, etc. Purging was
possible via the `purge` command, but only the entire cache could
be purged, which isn't always desirable.

A new command, `cache`, has been created with subcommands for
supported operations on the cache, which currently is limited to
populating and purging.

* Added `cmd.cacheCmd`, renamed `cmd.purgeCmd` to
  `cmd.purgeCachCmd` and moved it to be a subcommand
* Added flags to purging so that the operation can be forced (`-f`)
  so that confirmation can be bypassed, as well as now being able to
  specify a specific connection (`-c`) to limit purging
* Added `cmd.populateCacheCmd` that will iterate the full list of
  available connections and wriute each to the cache. This allows for
  a user to populate the entire set of connections at any given point
  and thus be able to avoid issues where Vault might be unavailable
  and an uncached connection is requested
* Updated tests to include populatting and purging connections
@cezmunsta cezmunsta added the enhancement New feature or request label Sep 27, 2021
@cezmunsta cezmunsta self-assigned this Sep 27, 2021
@cezmunsta cezmunsta merged commit 2d4bace into master Sep 27, 2021
@cezmunsta cezmunsta deleted the cache branch September 27, 2021 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve cache management

1 participant