--===============4732844359431258388== Content-Type: multipart/signed; boundary="nextPart1493834.5dQgFamXkQ"; micalg="pgp-sha1"; protocol="application/pgp-signature" --nextPart1493834.5dQgFamXkQ Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 --nextPart1493834.5dQgFamXkQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iEYEABECAAYFAlGofO4ACgkQ1rcusafx20MlKQCfRAWnP00TJXJv5blNFQwZw+6M 5f0An00o3hx33t/ohr1KgUsVAzjSIxRq =K+Vx -----END PGP SIGNATURE----- --nextPart1493834.5dQgFamXkQ-- --===============4732844359431258388== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============4732844359431258388==--