Remove useless import and replace cache with self._cache