code: def getCachedOrUpdatedValue(self, key):
          
          try:
              return self._VALUES[key]
          except KeyError:
              return self.getValue(key)
docs: 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.