Open JohnnyXu opened 6 years ago
Can you provide more details? Data, database, queries, operations between queries...
Reading the records.py
code shows, a cache is in place and there is no place, where it would get invalidated.
Scenarios using insert/delete/update shall invalidate current cache so implementing this shall resolve this issue.
Yeah, I have found that doing the insert/update/delete out of the code (for instance, using plain mysql client) makes that the current connection created with records library does not see it, as expected, even if I execute a new "select *" statement, because of the cache. The only way I have found to invalidate the cache is to close the connection and reconnect again, which seems quite expensive in terms of resources.
does records or SQLAlchemy cache require result? I find that once when new data insert/delete in DB, the same db.query still return old result. it can find the new data, only after I re-launch the process.