(response)
return time.time() + seconds
Parse Cache-Control header from response if it is set.
Parse Cache-Control header from response if it is set.
Parse Cache - Control header from response if it is set .
def _parse_cache_control(response):
        """Parse Cache-Control header from response if it is set."""
        value = response.headers.get("Cache-Control", "no-store").lower()

        if "no-store" in value:
            seconds = 0
        else:
            max_age = re.match(r".*max-age=\s*([0-9]+)\s*", value)
            if not max_age:
                seconds = 0
            else:
                seconds = int(max_age.groups()[0])
        return time.time() + seconds
def _parse_cache_control ( response ) : value = response . headers . get ( "Cache-Control" , "no-store" ) . lower ( ) if "no-store" in value : seconds = 0 else : max_age = re . match ( r".*max-age=\s*([0-9]+)\s*" , value ) if not max_age : seconds = 0 else : seconds = int ( max_age . groups ( ) [ 0 ] ) return time . time ( ) + seconds