perf: cache toResolveHierarchy (#2444)
Caches the resolved language hierarchy per (code, fallbackCode) pair, since toResolveHierarchy runs on every t() call and Intl.getCanonicalLocales is expensive. Cache is invalidated when options.fallbackLng changes and can be reset manually via languageUtils.clearCache(). Thanks @equaterina
E
Ecaterina committed
bb80369e1453cb9621011d51feaf7e0b8ba002f3
Parent: e1c60d4
Committed by GitHub <noreply@github.com>
on 8/20/2026, 9:12:47 AM