add cache support for global and instance of any kind of object