'Update the cache with the latest sample.'

def _update_cache(self, _sample):

    escaped_name = self.escaped_names.get(_sample.name, '')
    if (escaped_name not in self.required_meters):
        return
    self.cache[_sample.resource_id][escaped_name] = _sample
