File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -272,19 +272,8 @@ func (c *cacheConn) execUpdate(ctx context.Context, queryInfo domains.CachePlanQ
272272 return inner .ExecContext (ctx , queryInfo .Query , args )
273273 }
274274
275- uniqueValue := args [queryInfo .Update .Conditions [0 ].Placeholder .Index ]
276-
277275 for _ , cache := range cacheByTable [table ] {
278- if cache .uniqueOnly && usedBySelectQuery (cache .info .Targets , queryInfo .Update .Targets ) {
279- // we should forget the cache
280- cache .cache .Forget (cacheKey ([]driver.Value {uniqueValue .Value }))
281- } else {
282- if ! usedBySelectQuery (cache .info .Targets , queryInfo .Update .Targets ) {
283- // no need to purge because the cache does not contain the updated column
284- continue
285- }
286- cache .cache .Purge ()
287- }
276+ cache .cache .Purge ()
288277 }
289278
290279 return inner .ExecContext (ctx , queryInfo .Query , args )
You can’t perform that action at this time.
0 commit comments