Hi,
I'm using the Python Language Add-on for WPF and have a question about managing the FileBasedPackageRepository cache.
In my application, I have quite a few Python packages in the search paths. After a typical run, the cache contains approximately 3,800 files and occupies around 100 MB. The cache appears stable between application runs, which is good.
However, I'm wondering what happens when the underlying Python environment changes.
Specifically:
- When a Python package is upgraded to a newer version, does
FileBasedPackageRepositoryautomatically invalidate and remove the cached reflection data associated with the old version? - If a package is uninstalled, does the repository automatically remove its cached data?
- Is there an automatic cache cleanup or pruning mechanism?
- If obsolete cache data can accumulate, is there a recommended way to periodically clean it up?
I noticed that the .NET FileBasedAssemblyRepository provides a PruneCache() method, but I couldn't find an equivalent method on the Python FileBasedPackageRepository.
Thanks for any guidance!