Improve identity helper:

* fix the caching