code: def setduration(self, **duration):
          
          if len(duration) == 1:
              arg = [x[0] for x in duration.items()]
              if not arg[0] in self.units:
                  raise Exception('must be: %s' % str(self.units))
              self.duration = arg
          return self
docs: Set the caching duration which defines how long the
          file will be cached.
          @param duration: The cached file duration which defines how
              long the file will be cached.  A duration=0 means forever.
              The duration may be: (months|weeks|days|hours|minutes|seconds).
          @type duration: {unit:value}