MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / findLast

Function findLast

server/controllers/DataRequestCacheController.js:18–38  ·  view source on GitHub ↗
(drId, includeData = true)

Source from the content-addressed store, hash-verified

16};
17
18const 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
40const update = async (data, drId) => {
41 try {

Callers 1

updateFunction · 0.85

Calls 3

cacheKeyFunction · 0.85
deserializeFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected