Option to auto remove unused cache items after X days...

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, xnview

TsunamiZ

Post by TsunamiZ »

helmut wrote:A large cache can be a nuisance due to its size. And access to it might be even slower (not necessarily).

I like the idea of setting a cache limit and kicking out oldest entries from cache.

A limitation with date would be the deluxe version, but it will make things more complicated than actually needed. So I'd prefer the normal version (without maximum period for old entries).
Users should be able to choose to limit cache by size or days.
Dreamer
XnThusiast
Posts: 4605
Joined: Sun Jul 25, 2004 9:08 pm
Location: Slovakia

Post by Dreamer »

- Limit Cache Option (already in the Global Requests & Suggestions list).

"A - [x] Use maximal [X] MB for cache (then, first delete oldest items)

B - [x] Automatically delete items in cache older than [X] days

C - ...or better [x] Automatically delete items in cache not used for more than [X] days"

...so A, B, C or something else?

D

( ) Option A
( ) Option B
(o) Option C
( ) No action
User avatar
Olivier_G
XnThusiast
Posts: 1423
Joined: Thu Dec 23, 2004 7:17 pm
Location: Paris, France
Contact:

Post by Olivier_G »

TsunamiZ wrote:Remove oldest cached items first
helmut wrote:I like the idea of setting a cache limit and kicking out oldest entries from cache.
-> I believe you all mean the oldest accessed cached items!
..because throwing away items than have been cached a long time ago but that you keep browsing everyday... would be an extremely bad idea!!!

Moreover:
- are there some filetypes that typically require a lot of time for generating Thumbnails (pdf, video, folders...)? If so... it would be worth weighting the last access date by a factor (ex: 1 as default, 2 for video, 4 for folders, 10 for PDF...).
- is there a Cache mechanism to avoid caching small/fast objects? ...because if you end creating a cache item that is larger/slower than the original object, that's just BAD! <- EDIT: I now think that this shouldn't happen often. Probably not worth considering...

Olivier
Tommy
Posts: 127
Joined: Sat Dec 03, 2005 8:59 am

Post by Tommy »

i vote: C
Danny
Posts: 564
Joined: Sat Sep 04, 2004 5:09 pm

Post by Danny »

TsunamiZ wrote:And limiting to cache size can be a bad idea. Imagine some of your recent cache items being thrown out because you reached your cache size limit too soon.
Least viewed thumbs would get the shaft first, of course.
User avatar
helmut
Posts: 8219
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

Purpose of caching is maximum performance. Throwing old images out of the cache is extra work which will slow down things. And why throw out old entries just because they are old, even if there is still space in the cache? E.g. If you are on holidays for three weeks the cache will be cleaned first. And one minute later, when browsing the same folder/images, again, each single image has to be read. Not very efficient, I think.

When thinking about it one can find that A.) "Limit to [xx] MB" is the only solution that makes sense from the "performance" point of view.
TsunamiZ

Post by TsunamiZ »

Well how often do you go on 3 week vacations? :wink:

But perhaps there can be an additional setting to set permanently keep certain cache for specified folders. Those cache files would be stored in their respective folders. :idea:
User avatar
helmut
Posts: 8219
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

TsunamiZ wrote:Well how often do you go on 3 week vacations? :wink:

But perhaps there can be an additional setting to set permanently keep certain cache for specified folders. Those cache files would be stored in their respective folders. :idea:
A cache is there for performance reasons. Have a look at webbrowsers (IE, Firefox,...) and you won't find a setting "Remove entries older than [xx] from cache". There is a good reason for this.
Dreamer
XnThusiast
Posts: 4605
Joined: Sun Jul 25, 2004 9:08 pm
Location: Slovakia

Post by Dreamer »

OK, so some new ideas:

E - [x] Use maximum [X] MB for cache, then first delete least viewed items

or...

F
[x] Automatically delete items in cache not used for more than [X] days
[ ] Only if more than [X] MB are used for cache
Danny
Posts: 564
Joined: Sat Sep 04, 2004 5:09 pm

Post by Danny »

Dreamer wrote:OK, so some new ideas:

E - [x] Use maximum [X] MB for cache, then first delete least viewed items
As i said, i put my money on this one.
Post Reply