Return the TTL of the current request.

        :returns: The TTL value for the current request.
        :rtype: int

def get_max_age(self):
        '''Return the TTL of the current request.

        :returns: The TTL value for the current request.
        :rtype: int
        '''

        default_ttl = self.context.config.RESULT_STORAGE_EXPIRATION_SECONDS
        if self.context.request.max_age == 0:
            return self.context.request.max_age

        return default_ttl