https://bugs.kde.org/show_bug.cgi?id=423696

            Bug ID: 423696
           Summary: thumbnails KCM + cleanup
           Product: kio-extras
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: Thumbnails and previews
          Assignee: plasma-b...@kde.org
          Reporter: sit...@kde.org
  Target Milestone: ---

Implement cleanup of thumbnails.

It's very unlikely that the thumbnail spec will ever tell us what to do with
the cache specifically. In the end cache handling will largely depend on what a
specific desktop wants to do and the specification part is more about having
applications with different desktop backgrounds rely on the same backing data.
It is, I expect, why the spec currently only briefly mentions cache cleanup as
being difficult to specify outside the fact that removed files should have
their thumbs removed every once in a while.

With that in mind this really should just get the very same treatment as the
trash spec, which equally doesn't really touch on the specifics of how cleanup
should work on a UI level exactly.
Specifically there ought to be a thumbnails kcm (probably integrated in
dolphin) that allows the user to define:

- a maximum cache age
- a limit on the size of the cache
- actions to be taken when the cache exceeds the limit

Unlike trashing we cannot have the thumbnailer itself clean the cache as the
thumbnailer needs to be fast, a trivial cleanup service that gets forked or
kded' every once in a while should do the trick though. I think we have some
http cleanup thingy that may serve as inspiration. Or if someone can think of a
way to have the thumbnailer::get() be responsive while also iterating the
entire cache to look for old stuff that'd be cool as well of course.

Additional options could also be:
- remove thumbnails of local paths as soon as their files get deleted (the spec
suggests that, but it's actually fairly difficult as there's various things to
consider about fstab/mountedness/fstype(fuse)..)
- separate cache age by local vs. remote uris

Cache age determination likely ought to be based on access time rather than
modified time. If a thumbnail is being used there's no sense in deleting it I
should think.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to