File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -168,19 +168,19 @@ You can also use cache instance from a `db` to invalidate specific tables or tag
168
168
169
169
``` ts
170
170
// Invalidate all queries that use the `users` table. You can do this with the Drizzle instance.
171
- await db .$cache ? .invalidate ({ tables: users });
171
+ await db .$cache .invalidate ({ tables: users });
172
172
// or
173
- await db .$cache ? .invalidate ({ tables: [users , posts ] });
173
+ await db .$cache .invalidate ({ tables: [users , posts ] });
174
174
175
175
// Invalidate all queries that use the `usersTable`. You can do this by using just the table name.
176
- await db .$cache ? .invalidate ({ tables: " usersTable" });
176
+ await db .$cache .invalidate ({ tables: " usersTable" });
177
177
// or
178
- await db .$cache ? .invalidate ({ tables: [" usersTable" , " postsTable" ] });
178
+ await db .$cache .invalidate ({ tables: [" usersTable" , " postsTable" ] });
179
179
180
180
// You can also invalidate custom tags defined in any previously executed select queries.
181
- await db .$cache ? .invalidate ({ tags: " custom_key" });
181
+ await db .$cache .invalidate ({ tags: " custom_key" });
182
182
// or
183
- await db .$cache ? .invalidate ({ tags: [" custom_key" , " custom_key1" ] });
183
+ await db .$cache .invalidate ({ tags: [" custom_key" , " custom_key1" ] });
184
184
```
185
185
186
186
## Custom cache
You can’t perform that action at this time.
0 commit comments