Skip to content

Preview Caching #337

Description

@NSPC911

Is your request due to an existing bug?

No

What feature do you want in rovr?

Preview caching, similar to yazi

Describe any alternatives you've considered

Using yazi, or dealing with the slower preview times (esp heavy svgs, compressed archives)

Are there any other file managers with this feature?

yazi, ranger

Additional context

yazi's cache file names are generated using a 128-bit hash (possibly blake) computed from:

  1. File identity: The FileSig which includes:
    • The file's url (path)
    • The file's ChaSig (metadata signature) which includes:
      • File length (len)
      • Birth time (btime)
      • Change time (ctime)
      • Modification time (mtime)
  2. Skip parameter: A usize value passed from the preview job (used for pagination/seek operations in videos, PDFs, etc.)

I think for rovr, we could use a blake2b 16b (32 chars) on a template like this

h = hashlib.blake2b(digest_size=16)
h.update(f"{realpath}:{mtime}:{header-2kb}:{footer-2kb}" + (f": {index}" if type(index) is int else "")
h.hexdigest()

Metadata

Metadata

Assignees

Labels

difficulty: moderatethe feature can take a while to implementenhancementenhanced something by removing or adding somethingfeature-requestnew feature or requestrefactorthe files referenced need refactoring

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions