Add possibility to trigger the archiving only for a specific plugin #12945
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This feature allows a plugin to archive a specific plugin on demand.
For example if you have a plugin Foo that requires another plugin Bar to be archived with a specific segment of plugin Foo, you could do this in the archiver like this:
Currently, the workaround would be to add eg
;Segments[]="visitorType==returning,visitorType==returningCustomer"
to the config ini file. However, this will trigger the archiving for ALL reports even though it is only needed for one small report. This can make the difference of 3 minutes archiving time vs 50 minutes archiving time for a site.When would this be useful? Say you are rending a segmented User Country Map like this:
Then you don't want to archive all reports for this segment, but only eg
UserCountry
reports.This change may be also useful for later #11974 Eg when a plugin is being installed, it could call the code from
archiveBar()
during activation for say the last X months. (it wouldn't 100% work though since if the plugin is activated through the browser, browser archiving would need to be enabled in this example, but it could be achieved by listening to archiving events).I was thinking of offering a more general solution for above use case, but would wait until there are more use cases because I currently have only one use case.
Be good to have this in 3.5.1, otherwise in 3.6.0