[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Plasma theme cache auto-refresh
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2013-05-31 10:35:26
Message-ID: 5174243.x2GgklpCUG () freedom
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Friday, May 31, 2013 12:12:11 Kai Uwe Broulik wrote:
> Am Freitag, 31. Mai 2013, 11:40:43 schrieb Aaron J. Seigo:
> > i imagine it would look sth like the attached patch (which builds, but i
> > haven't tested it yet)
> 
> Works!

yay! thanks for testing.

i have one reservation, and that is that KSharedDataCache can auto-discard 
entries. which means this version entry could get popped out 
undeterministically, resulting in an unecessary dropping of the cache.

the version number could be encoded into the filename of the cache. that would 
have the interesting effect of making the check completely automatic: change 
the version, change the cache.

that creates a new issue: stale caches left laying around. so if the cache is 
empty (at which point we can assume it is a new cache) or, alternatively, if 
the cache file does not exist, checking for other cache files for the same theme 
but different v# could be done.

accidental name collision should also be taken into consideration. currently 
the cache file name is "plasma_theme_" + themeName. with the v# in there it 
could be "plasma_theme_" + themeName + versionNumber .. but then a theme 
called "myTheme2" would collide with "myTheme" with version 2 ;) so there 
needs to be a divider of some sort to avoid that. perhaps "plasma_theme_" + 
themeName + "_v_" + versionNumber.

so .. yes, patch needs a bit more work.


on a similar but unrelated note: the wallpaper cache also grows indefinitely. 
we probably should introduce an age/use algorithm for dropping cached 
wallpapers.

-- 
Aaron J. Seigo
["signature.asc" (application/pgp-signature)]

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic