Skip to content

Make smarthttp refchache DI(ed) instead of be global var

Pavlo Strokov requested to merge ps-smarthttp-refcache-di into master

The refcache used by smarhttp is a global variable scoped into a package and it uses another global config.Config var. As we are trying to break dependencies on the global vars this change removes usage of the config.Config from the LeaseKeyer implementation and substitutes it with storage.Locator abstraction. It also moves global infoRefCache var into a single place of its usage - inside of the server struct. Now it is injectable throw constructor function of it.

Part of: #2699 (closed)

Merge request reports