def _read_pam_header(self, data):
        regroups = re.search(
            b"(^P7[\n\r]+(?:(?:[\n\r]+)|(?:#.*)|"
            b"(HEIGHT\s+\d+)|(WIDTH\s+\d+)|(DEPTH\s+\d+)|(MAXVAL\s+\d+)|"
            b"(?:TUPLTYPE\s+\w+))*ENDHDR\n)", data).groups()
        self.header = regroups[0]
        self.magicnum = b'P7'
        for group in regroups[1:]:
            key, value = group.split()
            setattr(self, unicode(key).lower(), int(value))
        matches = re.findall(b"(TUPLTYPE\s+\w+)", self.header)
        self.tupltypes = [s.split(None, 1)[1] for s in matches]
Checks whether the page is already cached and returns the cached
dataset/ETHPy150Open SheffieldML/GPy/GPy/util/netpbmfile.py/NetpbmFile._read_pam_header--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.3/django/middleware/cache.py/FetchFromCacheMiddleware.process_request