Bug #510
closed
Need to periodically clean out Morpho cache
Added by Dan Higgins over 22 years ago.
Updated over 22 years ago.
Category:
morpho - general
Description
Morpho has a local cache to save documents downloaded from Metacat. Currently
this cache is never emptied. This causes a problem if a user does not have
access to some pieces of a package at one point and then is granted access at a
later point. (Some docs will have no content and the actual docs will never be
downloaded until the cache is cleared.)
We should either automatically clear the cache on startup or add a menu item to
clear the cache on demand.
There must be a better solution to this than simply clearing the cache
periodically, which might be quite time consuming for larger data sets. It
seems to me that there is a fundamental flaw in our caching model in that it
makes us ignore changes in the access rules on metacat. I assume this happens
when a user is added to a group, which should grant them access to packages
accessible by the group. The previous cached version/stub gets in the way. Is
there some more elegant way we can handle this?
The basic problem that has come up is that the cache ends up with documents
(files) which have no content (i.e. files of zero length). This occured most
often as a result of changes in the access control system of metacat (where
documents inside a package had 'public' access rather than being referenced by
the eml-access document). This resulted in a user (other than the creator)
having access to some docs and not others in a package. Adding accesses on
metacat fixed the problem, but the cache needed to be deleted to allow the user
to download the newly accessible docs. (Because zero-length files in the cache
indicated to Morpho that they did not need to be downloaded.)
The problem should be minimized in the future when all documents are associated
with a eml-access when created (in Morpho). But if some docs in a package have
no access or the access is changed, then the cache problem occurs.
So, one possibility other than dumping the whole cache might be to just
eliminate files with no content! That would force Morpho to always get a version
from metacat.
changed behavior of MetacatDataStore class to ignore (and delete) zero-length
files in cache. Ths should solve problem with changes in access control without
having to completely empty cache.
Original Bugzilla ID was 510
Also available in: Atom
PDF