Added method to receive cache for a class