Open vdvman1 opened 1 year ago
Last time I checked it does run the finalizers though. The method also calls super().clear()
, which invokes the implementation provided by python's MutableMapping
abstract base class, which calls __delitem__
for each cache entry. The MultiCache
calls the Cache.delete()
method when caches are removed with __delitem__
so finalizers should run fine.
What about lazily loaded caches that haven't yet been loaded?
Ooh yeah you're right, I guess this could be fixed by calling self.preload()
before doing anything in MultiCache.clear()
.
The
MultiCache.clear()
method just deletes the folder and its content, and never calls theclear
method of the individual caches within it, leading to the finalizers never being run