MCPcopy
hub / github.com/gofiber/fiber / loadVaryManifest

Function loadVaryManifest

middleware/cache/vary.go:97–111  ·  view source on GitHub ↗

nolint:gocritic // returning explicit values keeps the signature concise while avoiding unnecessary named results

(ctx context.Context, manager *manager, manifestKey string)

Source from the content-addressed store, hash-verified

95
96//nolint:gocritic // returning explicit values keeps the signature concise while avoiding unnecessary named results
97func loadVaryManifest(ctx context.Context, manager *manager, manifestKey string) ([]string, bool, error) {
98 raw, err := manager.getRaw(ctx, manifestKey)
99 if err != nil {
100 if errors.Is(err, errCacheMiss) {
101 return nil, false, nil
102 }
103 return nil, false, err
104 }
105 manifest := utils.UnsafeString(raw)
106 names, hasStar := parseVary(manifest)
107 if hasStar {
108 return nil, false, nil
109 }
110 return names, len(names) > 0, nil
111}

Callers 3

NewFunction · 0.85
Test_Cache_VaryAndAuthFunction · 0.85

Calls 3

parseVaryFunction · 0.85
IsMethod · 0.65
getRawMethod · 0.45

Tested by 2

Test_Cache_VaryAndAuthFunction · 0.68