needsCopy returns true if the role should be copied into a new buffer before being written to the cache todo: should this be signalled through cacheinfo instead?
(role cache.Role)
| 229 | // needsCopy returns true if the role should be copied into a new buffer before being written to the cache |
| 230 | // todo: should this be signalled through cacheinfo instead? |
| 231 | func needsCopy(role cache.Role) bool { |
| 232 | return role == cache.RoleParquetPage // parquet pages are reused by the library. if we don't copy them then the buffer may be reused before written to cache |
| 233 | } |