def touch(self, key, cost=None):
        """ Update score for key

        Provide a cost the first time and optionally thereafter.
        """
        time = self._base

        if cost is not None:
            self.cost[key] = cost
            self.time[key] += self._base
            time = self.time[key]
        else:
            try:
                cost = self.cost[key]
                self.time[key] += self._base
                time = self.time[key]
            except __HOLE__:
                return

        self._base *= self._base_multiplier
        return cost * time
dataset/ETHPy150Open blaze/cachey/cachey/score.py/Scorer.touch