implemented cache and object at index