且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么一个线程无法检测到另一个线程更新的更改值?

更新时间:2021-08-11 22:49:24

这是由事务的孤立性质造成的

This cause by the isolated nature of transactions

具有平均隔离度的事务将保持其迄今为止加载的状态,并继续为您提供事务本地的相同状态,即使实际数据已更改 - 这在事务隔离中称为可重复读取说法.

A transaction with an average degree of isolation will hold onto the state that it has loaded thus far, and keep giving you that same state local to the transaction even though the real data has changed - this is called repeatable reads in transaction isolation parlance.

如何禁用 SQLAlchemy 缓存?