Enable option to disable clearing cache in activate and deactivate plugin.
I think that the cache should be deleted when activating/deactivating plugins as otherwise it could cause problems with out of date cache. For example some plugins modify the tracker cache, and this needs to be re-set when a plugin is disabled. and the merged assets JS/CSS must be rebuilt when a plugin is deactivated. Closing for now but we may reopen if no better solution can be found.
Yes, it should be deleted after activating/deactivating. That's why default value is set to true. Purpose of this pull request is optionally disabling this action. When you run this function manually in your code.
@mattab: Did you saw my reference to this PR?
I closed the PR because it could lead to bugs: if the JS/CSS are not regenerated when a plugin is disabled for example, then the JS could reference some plugins API that is not available anymore (plugin was disabled). It would be a bug. We avoid introducing bugs :) let's discuss offline a better solution as I'm sure we will find one :+1: