Is IMatch "losing" and re-creating Cache Files?...and recommendations for reset

Started by Tveloso, April 30, 2020, 05:15:44 AM

Previous topic - Next topic

Tveloso

The majority of the files in my IMatch database are JPEGs, and are stored on a NAS.  Some time ago, I turned off the Don't Cache JPEG files option, because I wanted to be able to still view my files while away.

Now, with the new face recognition functionality, I believed it would still work for offline files, as long as they had been cached, and I set out to test that to make sure.  With my PC disconnected from my network, I performed some of the "Face Annotation manipulation" I've been doing recently, and all appeared to work. 

But when I exited the Viewer, I found that the files I had worked on were no longer able to be displayed (the "This File cannot be displayed" message appeared for them in the Quick View Panel (and now also in the Viewer).  And the {File.CacheFileName} variable did not return a value for them.

I then noticed that in the Info & Activity Panel, the Files in Cache (perm) count (52,229) was reporting significantly more files than there are files in my IMatch Database (47,936).  So I thought that perhaps under some conditions, IMatch was "losing sight" of the cache file for a given file, and then needing to create a new one (thereby causing Cache Files to "pile up").  But upon investigating further, I found that it was a slightly different behavior.

I did the following, with my PC dicsonnected from the Network:

1.) Make note of the Files in Cache (perm) count:

   

2.) Select one file (while working in People View) and make note of the Cache FileName:
D:\SysWork\photools.com\IMatch6\previewcache\C8201F9C-16AB-4397-9BA1-1405E722D427\34\3472.jpg

...and make sure that it actually exists on the disk:
dir D:\SysWork\photools.com\IMatch6\previewcache\C8201F9C-16AB-4397-9BA1-1405E722D427\34\3472.jpg
Volume in drive D is DATA
Volume Serial Number is B8CA-273E

Directory of D:\SysWork\photools.com\IMatch6\previewcache\C8201F9C-16AB-4397-9BA1-1405E722D427\34

04/29/2020  09:24 PM           249,083 3472.jpg
               1 File(s)        249,083 bytes
               0 Dir(s)  682,948,845,568 bytes free


3.) Open the file in the Viewer, slightly move one of its face Annotations, and close the Viewer

4.) After the file becomes "non-displayable" (about one second), check the File's Cache FileName:

(the {File.CacheFileName} variable now returns an empty string)

...make note the Files in Cache Count:

   

...and check for the existence of the Cache File:
dir D:\SysWork\photools.com\IMatch6\previewcache\C8201F9C-16AB-4397-9BA1-1405E722D427\34\3472.jpg
Volume in drive D is DATA
Volume Serial Number is B8CA-273E

Directory of D:\SysWork\photools.com\IMatch6\previewcache\C8201F9C-16AB-4397-9BA1-1405E722D427\34

File Not Found


(it appears that the Cache File has been deleted, but the Files in Cache Count is unchanged) *

5.) Re-connect to the Network, and attempt to view the "UnCached File"
(after a short delay, the file opens successfully in the Viewer)

6.) Check its Cache FileName:
D:\SysWork\photools.com\IMatch6\previewcache\C8201F9C-16AB-4397-9BA1-1405E722D427\34\3472.jpg

(the {File.CacheFileName} variable returns the same name it did initially)

...see if that file exists:
dir D:\SysWork\photools.com\IMatch6\previewcache\C8201F9C-16AB-4397-9BA1-1405E722D427\34\3472.jpg
Volume in drive D is DATA
Volume Serial Number is B8CA-273E

Directory of D:\SysWork\photools.com\IMatch6\previewcache\C8201F9C-16AB-4397-9BA1-1405E722D427\34

04/29/2020  10:42 PM           249,083 3472.jpg
               1 File(s)        249,083 bytes
               0 Dir(s)  682,948,296,704 bytes free


(the Cache File is back, but is newly created)

...and check the Files in Cache Count:

   

(it has gone up by one)

* I'm almost certain, that when I did this before (without documenting my steps), the Cache Files count went up by 1 both when the Cache file was deleted (step-4), and when it was re-created after reconnecting...(but of course, it didn't behave that way when I was watching closely).

I had debug logging turned on while performing the above steps, and I'll send that to the support email.

Now on to my question...I will not have access to my NAS for a few days (still Covid-sequestered though), and wanted to continue working in my IMatch Database while the files are off-line.  It's ok if I cannot do face work, as I have other things I can work on, but I'd like to ensure that all my files are Cached before I unplug.  Is it reccomended to do a Re-Scan at the Database Node, with the Update Cache only option?...and should I first delete the Cache Folder?

Thank you very much for your help

--Tony
--Tony

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Tveloso

Mario, the attached are my current Cache settings.

Would you recommend that I re-create the Cache (in order to have access to view my files once they're offline?...(I will be in that state starting tomorrow morning).
--Tony

Mario

Changing the cache settings (from Don't cache JPEG to chache) does not automatically create cache images. These settings are used when the cache file is needed the next time (you view the image in the Viewer or Quick View Panel). If you want to create the cache images in-advance, you have to use the Shift+Ctrl+F5 > Recreate Cache command. This should do the trick. Haven't used this for a long time and this is rather unusual.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Tveloso

Thank you Mario.  I'll go ahead and do that.

But what about the question of the Cache containing many more files than what I have in my database?...(and the observed increment of that FileCount, when IMatch deleted, then re-created, a single Cache File during my "off-line testing").

I just checked, and the Files in Cache count is accurate (Windows reports the same number of files in the Cache Directory), so it seems that during my test "an extra file" was created somewhere (but not in the specific "34" Directory where that sample Cache File lives).  I'll see if I can find that "extra file" (to see if it's a copy of the original), and will report back.
--Tony

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook