+19
-5
src/backend_s3.go
+19
-5
src/backend_s3.go
···
143
143
options.Weigher = weigher
144
144
}
145
145
if config.MaxStale != 0 {
146
-
options.RefreshCalculator = otter.RefreshWriting[K, V](time.Duration(config.MaxAge))
146
+
options.RefreshCalculator = otter.RefreshWriting[K, V](
147
+
time.Duration(config.MaxAge))
147
148
}
148
149
if config.MaxAge != 0 || config.MaxStale != 0 {
149
-
options.ExpiryCalculator = otter.ExpiryWriting[K, V](time.Duration(config.MaxAge + config.MaxStale))
150
+
options.ExpiryCalculator = otter.ExpiryWriting[K, V](
151
+
time.Duration(config.MaxAge + config.MaxStale))
150
152
}
151
153
return options
152
154
}
···
395
397
s3 *S3Backend
396
398
}
397
399
398
-
func (l s3ManifestLoader) Load(ctx context.Context, key string) (*CachedManifest, error) {
400
+
func (l s3ManifestLoader) Load(
401
+
ctx context.Context, key string,
402
+
) (
403
+
*CachedManifest, error,
404
+
) {
399
405
return l.load(ctx, key, nil)
400
406
}
401
407
402
-
func (l s3ManifestLoader) Reload(ctx context.Context, key string, oldValue *CachedManifest) (*CachedManifest, error) {
408
+
func (l s3ManifestLoader) Reload(
409
+
ctx context.Context, key string, oldValue *CachedManifest,
410
+
) (
411
+
*CachedManifest, error,
412
+
) {
403
413
return l.load(ctx, key, oldValue)
404
414
}
405
415
406
-
func (l s3ManifestLoader) load(ctx context.Context, name string, oldManifest *CachedManifest) (*CachedManifest, error) {
416
+
func (l s3ManifestLoader) load(
417
+
ctx context.Context, name string, oldManifest *CachedManifest,
418
+
) (
419
+
*CachedManifest, error,
420
+
) {
407
421
logc.Printf(ctx, "s3: get manifest %s\n", name)
408
422
409
423
loader := func() (*CachedManifest, error) {