generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: DefaultRecordTTL DefaultRecordLifetime
Moving defaults that are not specific to (re)publisher
- Loading branch information
Showing
5 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package ipns | ||
|
||
import "time" | ||
|
||
const ( | ||
|
||
// DefaultRecordLifetime defines for how long IPNS record should be valid | ||
// when ValidityType is 0. The default here aims to match the record | ||
// expiration window of Amino DHT. | ||
DefaultRecordLifetime = 48 * time.Hour | ||
|
||
// DefaultRecordTTL specifies how long the record can be returned from | ||
// cache before checking for update again. The function of this TTL is | ||
// similar to TTL of DNS record, and the default here is a trade-off | ||
// between faster updates and benefiting from various types of caching. | ||
DefaultRecordTTL = 1 * time.Hour | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters