checks cache for rendered html code.
        'cachetype' can be any string (usually the name of a method, e.g. "Thumbnail", or "InTable")
        relpath is the relative path, here treated as boolean.
        If cache is up-to-date, returns tuple of cachekey,html (NB: cachekey is path to cache file)
        If cache is out of date, calls regenerate() if not already done so, and returns tuple of cachekey,None.

def checkCache(self, cachetype, relpath):
        """checks cache for rendered html code.
        'cachetype' can be any string (usually the name of a method, e.g. "Thumbnail", or "InTable")
        relpath is the relative path, here treated as boolean.
        If cache is up-to-date, returns tuple of cachekey,html (NB: cachekey is path to cache file)
        If cache is out of date, calls regenerate() if not already done so, and returns tuple of cachekey,None.
        """
        cache_ext = self._cacheFileExtension(cachetype, relpath)
        filename, path = self.subproductPath(cache_ext)
        cachekey = path
        # check already read cache
        content = self.rendercache.get(path, None)
        if content is not None:
            return content
        # if cache file is up-to-date, attempt to read content
        if self.subproductUpToDate(path):
            dprintf(3, "render cache %s is up-to-date, reading in\n", path)
            try:
                content = open(path).read()
            except:
                print("Error reading render cache file", path, ", will regenerate")
                traceback.print_exc()
        else:
            dprintf(3, "render cache %s is out of date, will regenerate\n", path)
        # read content? cache and return
        if content is not None:
            self.rendercache[path] = content
            return path, content
        # else regenerate
        if not self._regenerated:
            self.regenerate()
            self._regenerated = True
        # and return path,None to indicate no cache
        return path, None