          try:
              os.remove(fname)
  
      def has_key(self, key, version=None):
          fname = self._key_to_file(key, version)
          if os.path.exists(fname):
              with open(fname, 'rb') as f:
                  return not self._is_expired(f)
 
</s> remove         with suppress(FileNotFoundError):
 </s> add         try: </s> remove         with suppress(FileNotFoundError):
            # The file may have been removed by another process.
 </s> add         try: </s> remove             with suppress(FileExistsError):
 </s> add             try: </s> remove 
        with suppress(KeyError):
 </s> add         except KeyError:
            pass
        try:
        except FileNotFoundError:
            # The file may have been removed by another process.
            pass
          try:
              os.remove(fname)
        except FileNotFoundError:
            # The file may have been removed by another process.
            pass
  
      def has_key(self, key, version=None):
          fname = self._key_to_file(key, version)
          if os.path.exists(fname):
              with open(fname, 'rb') as f:
                  return not self._is_expired(f)
keep add keep keep keep keep keep keep
 Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."

This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda
because try/except performs better. 
django/core/cache/backends/filebased.py