Bug 137491 - Editor image cache not flush when an image is modified outside digikam
Summary: Editor image cache not flush when an image is modified outside digikam
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: ImageEditor-Workflow (show other bugs)
Version: 0.9.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-17 16:04 UTC by polarbear
Modified: 2022-02-03 03:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description polarbear 2006-11-17 16:04:56 UTC
Version:           0.9.0-beta3 (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
Compiler:          gcc-4.1 
OS:                Linux

Starting from Digikam-0.9.0-beta1, the most recently viewed images are cached (perhaps pre-fetched). However, when an image is modified outside digikam, e.g. in gimp, while digikam is running, digikam is not intelligent enough to notice the change in the image and flush the cache. In another words, if I open an image with an external editor from digikam, have the image edited and saved, when I return to digikam and view the image, I still see the unedited version of the image. The only way to see the view the new version of the image is to restart digikam. Which effective flushes all in-memory cache.
Comment 1 caulier.gilles 2006-11-17 16:10:21 UTC
I can confirm this cache problem with current implementation.

Marcel, cache mechanism is your (:=)). Perhaps KDE API provide a way to get an  event if file have been changed by other applications...

Gilles Caulier
Comment 2 Marcel Wiesweg 2006-11-17 17:39:57 UTC
Yes, KDirWatch can watch files as well.
Is this critical for 0.9.0?
Comment 3 caulier.gilles 2006-11-17 18:09:07 UTC
Marcel, try to reproduce the problem and judge if if necessary to fix it before 0.9.0 release.

Gilles
Comment 4 Marcel Wiesweg 2006-11-18 16:43:36 UTC
The solution is to create a KDirWatch in the right place which watches the files currently in the cache, and remove them from the cache when changed.

I don't think this is release critical, I would prefer to fix it post-0.9.0.
Comment 5 Marcel Wiesweg 2006-12-23 17:20:33 UTC
SVN commit 616088 by mwiesweg:

Watch files contained in LoadingCache for changes from external programs:
- set a KDirWatch on all contained files
- update after cache operations


 M  +83 -3     loadingcache.cpp  
 M  +15 -2     loadingcache.h  
 M  +1 -1      loadingcacheinterface.cpp  
 M  +1 -1      loadsavetask.cpp  
Comment 6 polarbear 2007-07-18 14:12:06 UTC
This bug was fixed in 0.9.1 but came back again in 0.9.2. Please reopen it.