mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-12 11:48:07 +08:00
namesys: set the correct cache TTL on publish
fixes https://github.com/ipfs/go-ipfs/issues/6656#issuecomment-534252128
This commit is contained in:
parent
721c1abe4c
commit
36c0cbf4e1
@ -183,6 +183,9 @@ func (ns *mpns) PublishWithEOL(ctx context.Context, name ci.PrivKey, value path.
|
||||
return err
|
||||
}
|
||||
ttl := DefaultResolverCacheTTL
|
||||
if setTTL, ok := checkCtxTTL(ctx); ok {
|
||||
ttl = setTTL
|
||||
}
|
||||
if ttEol := time.Until(eol); ttEol < ttl {
|
||||
ttl = ttEol
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user