Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Yazi rapidly generates cached images when browsing the cache directory (/tmp/yazi) #481

@DarkKronicle

Description

@DarkKronicle

What system are you running Yazi on?

Linux Wayland

What terminal are you running Yazi in?

Kitty v0.31.0

Yazi version

yazi 0.1.5 (3fcc201 2024-01-05)

Did you try the latest main branch to see if the problem has already been fixed?

Tried, but the problem is still present

Describe the bug

If you have any cached images in the cache directory (/tmp/yazi in my case), browsing that folder within yazi will continually generate more files.

Expected Behavior

It would be optimal if yazi reused the cached files in the directory. If I understand the caching code correctly, it encodes the path in md5. If the current directory is the cache directory, you could just fetch the direct file by name, instead of re-encoding it.

To Reproduce

  1. Run yazi --clear-cache
  2. Run yazi, preview at least one image
  3. In yazi, navigate to /tmp/yazi, and enter it
  4. See amount of files skyrocket.

Configuration

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions