cache env rotate.
close in test.
update cache db.
fix db sanitize.
Merge remote-tracking branch 'origin/master'