(drId, includeData = true)
| 16 | }; |
| 17 | |
| 18 | const findLast = async (drId, includeData = true) => { |
| 19 | try { |
| 20 | const rawValue = await runtimeCache.store.get(cacheKey(drId)); |
| 21 | const cacheValue = deserialize(rawValue); |
| 22 | |
| 23 | if (!cacheValue) { |
| 24 | return false; |
| 25 | } |
| 26 | |
| 27 | if (!includeData) { |
| 28 | return { |
| 29 | dr_id: drId, |
| 30 | createdAt: cacheValue.createdAt, |
| 31 | }; |
| 32 | } |
| 33 | |
| 34 | return cacheValue; |
| 35 | } catch (_error) { |
| 36 | return false; |
| 37 | } |
| 38 | }; |
| 39 | |
| 40 | const update = async (data, drId) => { |
| 41 | try { |
no test coverage detected