feat (clientcache): use a persistent cache (#5051)
By default, we will use a persistent cache for the client cache. This will allow us to keep the cache across restarts of the server and it will also reduce the amount of time it takes to start the server while reducing the amount of memory used. This change also includes a validation of the cache schema version. If the schema version is different from the one expected, the cache will be reset/recreated. (cherry picked from commit cf8a51f3834033b7f986a9a7e091ab31c4328415)
This commit is contained in:
1 parent
384fc332be
commit
4d8a7dd39a
12 files changed
+289
-7
No files matched your search
+1
-2
@@ -19,7 +19,6 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/cmd/base"
|
||||
"github.com/hashicorp/boundary/internal/errors"
|
||||
"github.com/mitchellh/cli"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
"github.com/posener/complete"
|
||||
"gopkg.in/natefinch/lumberjack.v2"
|
||||
)
|
||||
@@ -243,7 +242,7 @@ func (c *StartCommand) Run(args []string) int {
|
||||
// DefaultDotDirectory returns the default path to the boundary dot directory.
|
||||
func DefaultDotDirectory(ctx context.Context) (string, error) {
|
||||
const op = "cache.DefaultDotDirectory"
|
||||
homeDir, err := homedir.Dir()
|
||||
homeDir, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return "", errors.Wrap(ctx, err, op)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user