Review Request 115326: fix theme cache cleanup and discarding

Harald Sitter sitter at kde.org
Thu Jan 30 10:53:57 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115326/
-----------------------------------------------------------

(Updated Jan. 30, 2014, 10:53 a.m.)


Review request for Plasma, Aaron J. Seigo and Martin Klapetek.


Changes
-------

added versioning of all cache files...


Repository: kdelibs


Description (updated)
-------

- to decide whether or not to discard a cache type now the mtimes of metadata.desktop and the pixmap cache file (previously this was an invalid file compared to cache change time)
- the discard check now compares the mtime of the actual pixmap cache file and the actual metadata file to ensure that we are comparing values with equal meaning (previously the kimagecache modification time was used  which appears to be the creation time of the object by default)
- whether the cache needs to be discard is decided before kimagecache is created to avoid it altering the mtime, actual discarding still happens after initialization of the pixmap cache
- introduced a new themeVersion member on the private class
- svgelements cache is now using a versioned cache file whenever themeVersion is not empty
- introduce svgelements cache maintenance in useCache()
- pixmap cache is now using a versioned cache file whenever themeVersion is not empty (previously the wrong name var was used)
- various variables inside useCache had their names adjusted to clearify their purpose.


Diffs (updated)
-----

  plasma/theme.cpp cb44878 

Diff: https://git.reviewboard.kde.org/r/115326/diff/


Testing (updated)
-------

cache file lineup:
  cache/plasma-svgelements-default
  cache/plasma-svgelements-default_v1.9
  cache/plasma-svgelements-default_v2.0 (no pix cache)
  cache/plasma_theme_default.kcache
  cache/plasma_theme_default_v1.9.kcache
  cache/plasma_theme_default_v2.1.kcache (no svg cache)

version of default theme for testing: 2.2

[T1] initial run without v2.2 caches:
deleted all previous caches, correctly created plasma-svgelements-default_v2.2 and plasma_theme_default_v2.2.kcache.

[T2] subsequent run with v2.2 cache present:
deleted all prevoius caches, existing v2.2 cache not deleted or discard by useCache().

[T3] subsequent run with v2.2 cache present and `touch metadata.desktop`:
deleted all prevoius caches, existing v2.2 cache not deleted, but discarded by useCache().

[T4] subsequent run with v2.2. cache, but default theme has no version anymore:
deleted *all* caches, discarded (newly created) empty caches plasma-svgelements-default and plasma_theme_default.kcache.


Thanks,

Harald Sitter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140130/759295b4/attachment.html>


More information about the Plasma-devel mailing list