MCPcopy Create free account
hub / github.com/cloudwan/gohan / setCachedSchemas

Method setCachedSchemas

cli/client/cache.go:49–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47}
48
49func (gohanClientCLI *GohanClientCLI) setCachedSchemas() error {
50 cache := Cache{
51 Expire: time.Now().Add(gohanClientCLI.opts.cacheTimeout),
52 Schemas: gohanClientCLI.schemas,
53 }
54 rawCache, _ := json.Marshal(cache)
55 err := ioutil.WriteFile(gohanClientCLI.opts.cachePath, rawCache, os.ModePerm)
56 if err != nil {
57 return err
58 }
59 return nil
60}

Callers 2

NewGohanClientCLIFunction · 0.95
client_test.goFile · 0.80

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected