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

put() — drizzle-orm Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  36c0ccc0_82ea_c367_6f87_d9a50834f614["put()"]
  208fff58_f804_2a07_330d_076472ff343f["TestGlobalCache"]
  36c0ccc0_82ea_c367_6f87_d9a50834f614 -->|defined in| 208fff58_f804_2a07_330d_076472ff343f
  style 36c0ccc0_82ea_c367_6f87_d9a50834f614 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

integration-tests/tests/mysql/mysql-common-cache.ts lines 26–42

	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/mysql/mysql-common-cache.ts.
Where is put() defined?
put() is defined in integration-tests/tests/mysql/mysql-common-cache.ts at line 26.

Analyze Your Own Codebase

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

Try Supermodel Free