Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
coanor committed Nov 10, 2023
1 parent a92c749 commit 1665590
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion diskcache/diskcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const (
dataHeaderLen = 4

// EOFHint labels a file's end.
EOFHint = uint32(0xdeadbeef) // Deprecated
EOFHint = uint32(0xdeadbeef)
)

// Generic diskcache errors.
Expand Down
4 changes: 1 addition & 3 deletions diskcache/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ func WithBatchSize(size int64) CacheOption {
}

// WithMaxDataSize set max single data size, default 32MB.
// NOTE: the max size of single data is 0xdeadbeef(~ 3.47GB), if size
// larger than 0xdeadbeef, reset to default value(32MB).
func WithMaxDataSize(size int32) CacheOption {
return func(c *DiskCache) {
if size > 0 && uint32(size) < EOFHint /* about 3.47GB */ {
if size > 0 {
c.maxDataSize = size
}
}
Expand Down

0 comments on commit 1665590

Please sign in to comment.