WIP: Cache invalidation by entity.

#6043 
WIP
I am not sure I am following. We look for an array key, not the value.
Should I modify the whole array keys to lowercase and then look for the key I need ?