MCPcopy Index your code
hub / github.com/BingyanStudio/github-analyzer / saveUserDataToCache

Function saveUserDataToCache

api/src/services/generateReport.ts:40–51  ·  view source on GitHub ↗
(
  login: string,
  data: UserData
)

Source from the content-addressed store, hash-verified

38
39// Function to save user data to cache
40async function saveUserDataToCache(
41 login: string,
42 data: UserData
43): Promise<void> {
44 try {
45 await redisClient.set(`userdata:${login}`, JSON.stringify(data));
46 // Set expiration to 1 hour (in seconds)
47 await redisClient.expire(`userdata:${login}`, 60 * 60);
48 } catch (err) {
49 console.error("Redis cache save error:", err);
50 }
51}
52
53function parseCommits(nodes: any): Repository[] {
54 return nodes

Callers 1

fetchUserDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected