

def is_immutable_file(self, path, url):
    '\n        Determine whether given URL represents an immutable file (i.e. a\n        file with a hash of its contents as part of its name) which can\n        therefore be cached forever\n        '
    if (not url.startswith(self.static_prefix)):
        return False
    name = url[len(self.static_prefix):]
    name_without_hash = self.get_name_without_hash(name)
    if (name == name_without_hash):
        return False
    static_url = self.get_static_url(name_without_hash)
    if (static_url and static_url.endswith(url)):
        return True
    return False

dataset/ETHPy150Open evansd/whitenoise/whitenoise/django.py DjangoWhiteNoise.is_immutable_file/original