Home / Function/ put() — drizzle-orm Function Reference

put() — drizzle-orm Function Reference

Architecture documentation for the put() function in pg-common-cache.ts from the drizzle-orm codebase.

Entity Profile

Dependency Diagram

graph TD
  1381d0ac_e684_3f19_6d40_fdbfb7c607f3["put()"]
  d43d88d6_c6b6_386d_d59b_76b8db53bf29["TestGlobalCache"]
  1381d0ac_e684_3f19_6d40_fdbfb7c607f3 -->|defined in| d43d88d6_c6b6_386d_d59b_76b8db53bf29
  style 1381d0ac_e684_3f19_6d40_fdbfb7c607f3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

integration-tests/tests/pg/pg-common-cache.ts lines 27–43

	override async put(
		key: string,
		response: any,
		tables: string[],
		isTag: boolean,
		config?: CacheConfig,
	): Promise<void> {
		await this.kv.set(key, response, config ? config.ex : this.globalTtl);
		for (const table of tables) {
			const keys = this.usedTablesPerKey[table];
			if (keys === undefined) {
				this.usedTablesPerKey[table] = [key];
			} else {
				keys.push(key);
			}
		}
	}

Domain

Subdomains

Frequently Asked Questions

What does put() do?
put() is a function in the drizzle-orm codebase, defined in integration-tests/tests/pg/pg-common-cache.ts.
Where is put() defined?
put() is defined in integration-tests/tests/pg/pg-common-cache.ts at line 27.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free