              clean_name, fragment = urldefrag(name)
              if urlsplit(clean_name).path.endswith('/'):  # don't hash paths
                  hashed_name = name
              else:
                  cache_key = self.cache_key(name)
                  hashed_name = self.cache.get(cache_key)
                  if hashed_name is None:
                      hashed_name = self.hashed_name(clean_name).replace('\\', '/')
                      # set the cache if there was a miss
                      # (e.g. if cache server goes down)
                      self.cache.set(cache_key, hashed_name)
  
          final_url = super(CachedFilesMixin, self).url(hashed_name)
  
          # Special casing for a @font-face hack, like url(myfont.eot?#iefix")
          # http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax
 
</s> remove         final_url = super(CachedFilesMixin, self).url(hashed_name)
 </s> add         final_url = super(HashedFilesMixin, self).url(hashed_name) </s> remove                         hashed_name = force_text(saved_name.replace('\\', '/'))
 </s> add                         hashed_name = force_text(self.clean_name(saved_name)) </s> remove                     hashed_name = force_text(saved_name.replace('\\', '/'))
 </s> add                     hashed_name = force_text(self.clean_name(saved_name)) </s> remove         # Finally set the cache
        self.cache.set_many(hashed_paths)
 </s> add         # Finally store the processed paths
        self.hashed_files.update(hashed_files)

    def clean_name(self, name):
        return name.replace('\\', '/')

    def hash_key(self, name):
        return name

    def stored_name(self, name):
        hash_key = self.hash_key(name)
        cache_name = self.hashed_files.get(hash_key)
        if cache_name is None:
            cache_name = self.clean_name(self.hashed_name(name))
            # store the hashed name if there was a miss, e.g.
            # when the files are still processed
            self.hashed_files[hash_key] = cache_name
        return cache_name


class ManifestFilesMixin(HashedFilesMixin):
    manifest_version = '1.0'  # the manifest format standard
    manifest_name = 'staticfiles.json'

    def __init__(self, *args, **kwargs):
        super(ManifestFilesMixin, self).__init__(*args, **kwargs)
        self.hashed_files = self.load_manifest()

    def read_manifest(self):
        try:
            with self.open(self.manifest_name) as manifest:
                return manifest.read()
        except IOError:
            return None

    def load_manifest(self):
        content = self.read_manifest()
        if content is None:
            return OrderedDict()
        try:
            stored = json.loads(content, object_pairs_hook=OrderedDict)
        except ValueError:
            pass
        else:
            version = stored.get('version', None)
            if version == '1.0':
                return stored.get('paths', OrderedDict())
        raise ValueError("Couldn't load manifest '%s' (version %s)" %
                         (self.manifest_name, self.manifest_version))

    def post_process(self, *args, **kwargs):
        all_post_processed = super(ManifestFilesMixin,
                                   self).post_process(*args, **kwargs)
        for post_processed in all_post_processed:
            yield post_processed
        payload = {'paths': self.hashed_files, 'version': self.manifest_version}
        if self.exists(self.manifest_name):
            self.delete(self.manifest_name)
        self._save(self.manifest_name, ContentFile(json.dumps(payload)))


class _MappingCache(object):
    """
    A small dict-like wrapper for a given cache backend instance.
    """
    def __init__(self, cache):
        self.cache = cache

    def __setitem__(self, key, value):
        self.cache.set(key, value)

    def __getitem__(self, key):
        value = self.cache.get(key, None)
        if value is None:
            raise KeyError("Couldn't find a file name '%s'" % key)
        return value

    def clear(self):
        self.cache.clear()

    def update(self, data):
        self.cache.set_many(data)

    def get(self, key, default=None):
        try:
            return self[key]
        except KeyError:
            return default


class CachedFilesMixin(HashedFilesMixin):
    def __init__(self, *args, **kwargs):
        super(CachedFilesMixin, self).__init__(*args, **kwargs)
        try:
            self.hashed_files = _MappingCache(caches['staticfiles'])
        except InvalidCacheBackendError:
            # Use the default backend
            self.hashed_files = _MappingCache(default_cache)

    def hash_key(self, name):
        key = hashlib.md5(force_bytes(self.clean_name(name))).hexdigest()
        return 'staticfiles:%s' % key </s> remove                 hashed_paths[self.cache_key(name.replace('\\', '/'))] = hashed_name
 </s> add                 hashed_files[self.hash_key(name)] = hashed_name
                hashed_name = self.stored_name(clean_name)
              clean_name, fragment = urldefrag(name)
              if urlsplit(clean_name).path.endswith('/'):  # don't hash paths
                  hashed_name = name
              else:
                hashed_name = self.stored_name(clean_name)
                hashed_name = self.stored_name(clean_name)
                hashed_name = self.stored_name(clean_name)
                hashed_name = self.stored_name(clean_name)
                hashed_name = self.stored_name(clean_name)
                hashed_name = self.stored_name(clean_name)
                hashed_name = self.stored_name(clean_name)
  
          final_url = super(CachedFilesMixin, self).url(hashed_name)
  
          # Special casing for a @font-face hack, like url(myfont.eot?#iefix")
          # http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Added ManifestStaticFilesStorage to staticfiles contrib app.

It uses a static manifest file that is created when running
collectstatic in the JSON format. 
django/contrib/staticfiles/storage.py