optimize iterations by caching keylist for publish and observe maps