[bt-devel] [ bibletime-Bugs-2899173 ] Caches have no automatic invalidation.

SourceForge.net noreply at sourceforge.net
Sat Nov 28 08:58:54 MST 2009


Bugs item #2899173, was opened at 2009-11-17 16:27
Message generated for change (Comment added) made by mgruner
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100954&aid=2899173&group_id=954

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: new bug
>Status: Closed
Resolution: Accepted
Priority: 6
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Martin Gruner (mgruner)
Summary: Caches have no automatic invalidation.

Initial Comment:
As discussed in IRC: http://gist.github.com/236971
situations can arise that cause a cache entry to become invalid. 

An invalid cache results in all entries not cached previously becoming inaccessible via the user interface, with only one exception, searches.

At present, based on my discoveries, there is no automatic way for the cache to become invalid, not even a place in the user interface to do it. 

This means that once a given work is viewed, and the cache is generated, the cache is never regenerated, so if the cache is generated wrongly, or the source material changes, the user interface will be bound to the legacy version of it as cached. 

For the seemingly low amount of benefit the cache gives, the negatives of the cache not being updated ( for me at least ) are overwhelming. 

A good simple check would be mtime based checks so the cache is updated when the sword module is, or possibly, on startup when bibletime asks sword for the list of installed modules, it should implicitly flush metadata relating to  entries that are no longer present.  ( this would have solved the cache problem when I removed everything and started from scratch, however, instead I find that removing things leave all their indices intact :S ) 

All bugs aside, thanks for the great project.  A good short term workaround for anyone experiencing the same symptoms as I is to flush ~/.bibletime/cache down the drain.  


----------------------------------------------------------------------

>Comment By: Martin Gruner (mgruner)
Date: 2009-11-28 16:58

Message:
This is now fixed. The version number of QDataStream is now also checked at
cache file validation.
Regards, Martin

----------------------------------------------------------------------

Comment By: Martin Gruner (mgruner)
Date: 2009-11-22 21:29

Message:
Eeli, manual cache deletion is not neccessary. Can you implement your
additional version number check as you suggested? It should be a quick
fix.

Regards, Martin

----------------------------------------------------------------------

Comment By: Eeli Kaikkonen (eelik)
Date: 2009-11-17 23:03

Message:
The lexicon caches should be regenerated if the module (work) version
number differs or the cache code version number differs. Deleting cache
automatically when removing a work is of course possible and reasonable,
but I would rather find the root of the problem. One thing comes to mind:
QDataStream which is used to read/write data has version numbers because
the implementation may change. It's not considered in our code. Therefore,
if Qt version is changed there may be errors reading the cache. Could that
be the case?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100954&aid=2899173&group_id=954



More information about the bt-devel mailing list