You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, the MetadataService layer maintains a cache of Results which it invalidates whenever it (periodically) asks the ItemCollectionLibrary to refresh the collection. This is suboptimal in several ways, and will tend to cause cached results to be discarded more frequently than they need to be if the ItemCollectionLibrary gets more intelligent about refresh, for example by pre-checking the source document and retaining previous results if the source document has not changed (aside: this probably requires reworking the single source pipeline into a document fetch and processing pipeline). It also doesn't work at all if several MetadataServices are clients of the same ItemCollectionLibrary.
A better solution would be to attach a generation tag (e.g., a UUID) to each IdentifiedItemCollection and have the MetadataService remember that in its cache along with the corresponding Result. The MetadataService would then revalidate cache contents by making an IdentifiedItemCollection query and comparing generation tags. If the tag matched, the cached Result would still be valid; if not, the cached Result would be discarded.
This would also move the control of refresh firmly back into ItemCollectionLibrary, which I think is preferable to the current hack.
The text was updated successfully, but these errors were encountered:
At present, the
MetadataService
layer maintains a cache ofResult
s which it invalidates whenever it (periodically) asks theItemCollectionLibrary
to refresh the collection. This is suboptimal in several ways, and will tend to cause cached results to be discarded more frequently than they need to be if theItemCollectionLibrary
gets more intelligent about refresh, for example by pre-checking the source document and retaining previous results if the source document has not changed (aside: this probably requires reworking the single source pipeline into a document fetch and processing pipeline). It also doesn't work at all if severalMetadataService
s are clients of the sameItemCollectionLibrary
.A better solution would be to attach a generation tag (e.g., a UUID) to each
IdentifiedItemCollection
and have theMetadataService
remember that in its cache along with the correspondingResult
. TheMetadataService
would then revalidate cache contents by making anIdentifiedItemCollection
query and comparing generation tags. If the tag matched, the cachedResult
would still be valid; if not, the cachedResult
would be discarded.This would also move the control of refresh firmly back into
ItemCollectionLibrary
, which I think is preferable to the current hack.The text was updated successfully, but these errors were encountered: