/
Speed up detection of countries with states [5.2.2-B2]

Speed up detection of countries with states [5.2.2-B2]

In-Portal has a database of all countries and their states (when applicable). Usually, that information doesn't change.

The "\kCountryStatesHelper::getCountriesWithStates" method used to detect countries with states (returns the USA and Canada) however always is performing a database query to detect them.

Solution

Cache results of the "\kCountryStatesHelper::getCountriesWithStates" method into memcache with self-resetting key (by "country-state" unit serial).

Related Tasks

INP-1802 - Getting issue details... STATUS