UNPKG

@wmfs/tymly

Version:

A framework for building and sharing workflows in Node.js

17 lines (14 loc) 420 B
module.exports = class GetCacheItem { init (resourceConfig, env) { this.caches = env.bootedServices.caches } run (event, context) { const { cacheName, key } = event try { const item = this.caches.get(cacheName, key) return context.sendTaskSuccess(item) } catch (err) { return context.sendTaskFailure({ error: 'GetCacheItemFail', cause: err }) } } // run } // GetCacheItem