PutSize puts the length of the file.
(name string, len int64)
| 133 | |
| 134 | // PutSize puts the length of the file. |
| 135 | func (c *fileCache) PutSize(name string, len int64) bool { |
| 136 | key := filepath.Join(name, "metainfo") |
| 137 | c.metadataCache.Set(key, len) |
| 138 | c.log.Debug().Str("key", key).Int64("len", len).Msg("put len") |
| 139 | return true |
| 140 | } |
| 141 | |
| 142 | func (c *fileCache) getKey(name string, offset int64) string { |
| 143 | return filepath.Join(c.path, name, strconv.FormatInt(offset, 10)) |