MCPcopy Create free account
hub / github.com/BingyanStudio/github-analyzer / getUserDataFromCache

Function getUserDataFromCache

api/src/services/generateReport.ts:26–37  ·  view source on GitHub ↗
(login: string)

Source from the content-addressed store, hash-verified

24
25// Function to get user data from cache
26async function getUserDataFromCache(login: string): Promise<UserData | null> {
27 try {
28 const cachedData = await redisClient.get(`userdata:${login}`);
29 if (cachedData) {
30 return JSON.parse(cachedData);
31 }
32 return null;
33 } catch (err) {
34 console.error("Redis cache get error:", err);
35 return null;
36 }
37}
38
39// Function to save user data to cache
40async function saveUserDataToCache(

Callers 1

fetchUserDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected