Redis and MySQL question

I am not familiar with redis and I have some trouble understanding the redis and mysql relation of emoncms.

I understand redis when enabled is the place where feed's last values are stored for input operations that need it, like rate change and kwh calculation. What I don't understand is if and how these values are synced back to mysql.

I have a local emoncms installaiton (updated to git 8.3.6). Time and value in the feeds mysql table are stuck to some very old values and never updated. Size of the feeed seems to get updated. This creates the problem for me, that if I backup the mysql and migrate the db and installation, last values are all wrong, and any value based on them is calculated wrong.

Also I had problems with creating new input processes unless I turned off redis so emoncms could write directly to mysql. Same thing with trying to change feeds between public and private. I suspect it's a problem with my installation and not something general. Can you point me on which part of the code the redis and mysql are synced, so I can investigate more?

Thanks