We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cfcf81 commit b7ccf30Copy full SHA for b7ccf30
file.go
@@ -76,6 +76,16 @@ func (c *Cache) SaveToFileConcurrent(filePath string, concurrency int) error {
76
return nil
77
}
78
79
+// LoadFromFileMaxBytes loads cache data from the specified filePath,
80
+// enforcing that the cache capacity matches the provided maxBytes value.
81
+//
82
+// Returns an error if the stored cache's capacity differs from maxBytes.
83
84
+// See SaveToFile* for functions that persist cache data to a file.
85
+func LoadFromFileMaxBytes(filePath string, maxBytes int) (*Cache, error) {
86
+ return load(filePath, maxBytes)
87
+}
88
+
89
// LoadFromFile loads cache data from the given filePath.
90
//
91
// See SaveToFile* for saving cache data to file.
0 commit comments