Caching last state