fixed issues related to caches not being updated when adding entities