Fixing #863 today, made me wander if this bug was the only cause for all 
the troubles with the cache we have had in past.

It seems to me now that it's possible.

All these bugs caused by cache were very mysterious to me until now. I 
asked myself many times: How is it possible that the cached list that 
produced file with the content whose checksum is the same as the checksum 
of the external file, when recreated into outline produces different 
content? It was unthinkable to my mind, but now I have realized that it can 
happen only if we don't recreate the exact same outline as the one that was 
cached. And the difference may come from clones that are located elsewhere 
in the outline.

After realizing this I wander whether we still need all those juggling with 
the cache names or not. Concerning the file contents cache I trust that it 
is not necessary at all. I wander what else data do we store in cache and 
if it makes sense to have this data separate to each Leo document or not. 

As far as the external files and git branches are concerned, it would be 
easy to test this idea. First in leoCache override the calculated db path 
with the fixed path. Then open Leo, switch branch while Leo is still open 
or close Leo, switch branch and then reopen Leo. In both cases after 
opening Leo and saving all external files, no file should be reported as 
'written'. They all must be reported as 'unchanged'.

If this test should pass, I think that we might get rid of all this 
different cache names and use the simplest one. It would reduce the size of 
cache db and most importantly Leo would load faster.

Vitalije

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to