<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def getMaxAge(self):
        "get the max-age in seconds from the saved headers data"
        max_age = 0
        cache_control = self.headers.get('cache-control')
        if cache_control:
            params = dict(urlparse.parse_qsl(cache_control))
            max_age = int(params.get('max-age', '0'))
        return max_age