- Issue created by @phenaproxima
- πΊπΈUnited States phenaproxima Massachusetts
Meh...ended up handling this in the original issue. Why not; let's just fix stuff up while we have the opportunity.
As I pointed out in
#3536664-6: Data cached by EnabledSourceHandler never expires β
, EnabledSourceHandler
is hard to understand and maintain because it combines several distinct responsibilities in ways, massively violating the single-responsibility principle.
It has three purposes:
Each of these needs to be a separate class; EnabledSourceHandler should probably be removed. It is internal, so we have latitude to remove it without breaking our backwards-compatibility promise.
Split EnabledSourceHandler
into three classes:
QueryManager
: handles querying and query cachingProjectRepository
: acts as a permanent store for Project objects, that gets updated on a rolling basis as queries return new data, and can only be cleared by an explicit command-line actionProjectBrowserSourceManager
: Already exists, but the functionality of getCurrentSources()
should be moved into it as a new getAllEnabledSources()
method.Active
2.1
Code
Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.
Meh...ended up handling this in the original issue. Why not; let's just fix stuff up while we have the opportunity.