This PR adds a MsBackend that provides a caching mechanism allowing to add or modify spectra variables of a read-only MsBackend. Spectra variable setter methods add values to a local slot with a data.frame, accessor methods first evaluate if a variable is available in the local cache and in case returns that.
Database-backed MsBackends can extend this MsBackendCached instead of the MsBackend to have the caching mechanism available. Prime examples that can immediately use this backend are the MsBackendMassbankSql and the MsBackendCompDb.
This PR adds a
MsBackend
that provides a caching mechanism allowing to add or modify spectra variables of a read-onlyMsBackend
. Spectra variable setter methods add values to a local slot with adata.frame
, accessor methods first evaluate if a variable is available in the local cache and in case returns that.Database-backed
MsBackend
s can extend thisMsBackendCached
instead of theMsBackend
to have the caching mechanism available. Prime examples that can immediately use this backend are theMsBackendMassbankSql
and theMsBackendCompDb
.