Isuse #141: Adding caching to state system.