Added caching of Uid.toString() result (with WeakReference).