code: def cacheContent(self, request, response, buffer):
          
          content = buffer.getvalue()
          code = int(response.code)
          cache_it = False
          uri, bust = self.processURI(request.uri, PREFIX)
          # Conditions for adding uri response to cache:
          #     * if it was successful i.e. status of in the 200s
          #     * requested using GET
          #     * not busted
          if request.method == "GET" and code / 100 == 2 and not bust:
              cache_control = response.headers.get('cache-control')
              if cache_control:
                  params = dict(urlparse.parse_qsl(cache_control))
                  if int(params.get('max-age', '0')) > 0:
                      cache_it = True
              if cache_it:
                  content = compressBuffer(content)
                  self.addResource(content, uri, response.headers)
          buffer.close()
docs: Checks if the response should be cached.
          Caches the content in a gzipped format given that a `cache_it` flag is
          True
          To be used CacheClient