fix: clear_cache might be unavailable on process termination
To quote official doc:
del() can be executed during interpreter shutdown. As a consequence, the global variables it needs to access (including other modules) may already have been deleted or set to None. Python guarantees that globals whose name begins with a single underscore are deleted from their module before other globals are deleted; if no other references to such globals exist, this may help in assuring that imported modules are still available at the time when the del() method is called.
See: https://docs.python.org/3/reference/datamodel.html#object.__del__