get() — drizzle-orm Function Reference
Architecture documentation for the get() function in cache.ts from the drizzle-orm codebase.
Entity Profile
Dependency Diagram
graph TD 242a537d_d218_d2bf_f6bb_32151abfb86e["get()"] 418ebf5b_65ad_1cd4_79ba_2c99e874ea49["UpstashCache"] 242a537d_d218_d2bf_f6bb_32151abfb86e -->|defined in| 418ebf5b_65ad_1cd4_79ba_2c99e874ea49 style 242a537d_d218_d2bf_f6bb_32151abfb86e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
drizzle-orm/src/cache/upstash/cache.ts lines 127–147
override async get(
key: string,
tables: string[],
isTag: boolean = false,
isAutoInvalidate?: boolean,
): Promise<any[] | undefined> {
if (!isAutoInvalidate) {
const result = await this.redis.hget(UpstashCache.nonAutoInvalidateTablePrefix, key);
return result === null ? undefined : result as any[];
}
if (isTag) {
const result = await this.luaScripts.getByTagScript.exec([UpstashCache.tagsMapKey], [key]);
return result === null ? undefined : result as any[];
}
// Normal cache lookup for the composite key
const compositeKey = this.getCompositeKey(tables);
const result = await this.redis.hget(compositeKey, key) ?? undefined; // Retrieve result for normal query
return result === null ? undefined : result as any[];
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does get() do?
get() is a function in the drizzle-orm codebase, defined in drizzle-orm/src/cache/upstash/cache.ts.
Where is get() defined?
get() is defined in drizzle-orm/src/cache/upstash/cache.ts at line 127.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free