Update cache in __destruct

Signed-off-by: Guillaume Poirier-Morency <guillaumepoiriermorency@gmail.com>