def _populate_cache(self):
        """
        Walk through the whole file and populate the cache
        all objects below the current path are added, i.e.
        for the contents with ina, inb and inab TH1F histograms::

           /a/ina
           /b/inb
           /a/b/inab

        the cache is (omitting the directories)::

            cache[""]["obj"] = [("a", ("ina", "TH1F")),
                                ("b", ("inb", "TH1F")),
                                ("a/b", ("inab", "TH1F"))]

            ...

            cache[""]["a"]["b"]["obj"] = [("a/b", ("inab", "TH1F"))]

        """
        self.cache = autovivitree()

        for path, dirs, objects in self.walk(return_classname=True,
                                             treat_dirs_as_objs=True):
            b = self.cache
            for d in ['']+path.split('/'):
                b = b[d]
                obj = [(path, o) for o in objects]
                if 'obj' in b:
                    b['obj'] += obj
                else:
                    b['obj'] = obj