<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getCachedOrUpdatedValue(self, key):
 """ Gets the device's value with the given key. If the key is not found in the cache, the value is queried from the host. """

        try:
            return self._VALUES[key]
        except KeyError:
            return self.getValue(key)