Skip to content

DiskBasedCache uses different inputs for file size #57

@jpd236

Description

@jpd236

Forking from #52 (comment):

Some parts of DiskBasedCache use the file size as the size of the cache entry, which includes the header overhead. Other parts use the data size which doesn't include the header overhead.

We should make this sane. Some constraints:

  • I'd generally prefer we use an accurate size on disk since we advertise the cache as using at most that size, but not including the overhead means we might exceed it.
  • It's currently hard to calculate the size prior to writing the entry because we don't know how big the CacheHeader will be. I think it would be technically feasible to calculate this deterministically though given that serialization format is fixed (or at least to estimate it...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions