MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / setCache

Method setCache

packages/db/src/buffers/profile-buffer.ts:97–108  ·  view source on GitHub ↗
(profile: IClickhouseProfile)

Source from the content-addressed store, hash-verified

95 }
96
97 public async setCache(profile: IClickhouseProfile): Promise<void> {
98 const cacheKey = this.getProfileCacheKey({
99 profileId: profile.id,
100 projectId: profile.project_id,
101 });
102 await this.redis.set(
103 cacheKey,
104 JSON.stringify(profile),
105 'EX',
106 this.ttlInSeconds
107 );
108 }
109
110 async add(profile: IClickhouseProfile, isFromEvent = false) {
111 return this.timeAdd(async () => {

Callers

nothing calls this directly

Calls 3

getProfileCacheKeyMethod · 0.95
setMethod · 0.45
stringifyMethod · 0.45

Tested by

no test coverage detected