def store(self):
        '''
        Write content of the entire cache to disk
        '''
        if msgpack is None:
            log.error('Cache cannot be stored on disk: msgpack is missing')
        else:
            # TODO Dir hashing?
            try:
                with salt.utils.files.fopen(self._path, 'wb+') as fp_:
                    cache = {
                        "CacheDisk_data": self._dict,
                        "CacheDisk_cachetime": self._key_cache_time
                    }
                    msgpack.dump(cache, fp_, use_bin_type=True)
            except (IOError, OSError) as err:
                log.error('Error storing cache data to the disk: %s', err)