Commit 86ad090e authored by A. Koch's avatar A. Koch

fix caching of metdata

parent b2fa5178
Pipeline #1312 passed with stage
......@@ -58,7 +58,7 @@ class Metadata extends TinyEmitter {
}
if (!metadata || !Object.keys(metadata).length) {
metadata = await fetchMetaData(annotation || source, req.user, _this._annotations, api)
if (_this._memcached && metadata && Object.keys(metadata) > 0) {
if (_this._memcached && metadata && Object.keys(metadata).length) {
await new Promise((resolve, reject) => {
_this._memcached.set(key, metadata, parseInt(config.metadata.lifetime.toString()), err => {
if (err) api.captureException(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment