12
12
use Magento \GraphQlResolverCache \Model \Resolver \Result \CacheKey \Calculator ;
13
13
14
14
/**
15
- * Provides custom cache key calculators for the resolvers chain.
15
+ * Provides cache key calculators for the resolvers chain.
16
16
*/
17
17
class Provider implements ProviderInterface
18
18
{
@@ -62,7 +62,7 @@ private function initForResolver(ResolverInterface $resolver): void
62
62
"GraphQL Resolver Cache key factors are not determined for {$ resolverClass } or its parents. "
63
63
);
64
64
} else {
65
- $ runtimePoolKey = $ this ->generateCustomProvidersKey ($ factorProviders );
65
+ $ runtimePoolKey = $ this ->generateKeyFromFactorProviders ($ factorProviders );
66
66
if (!isset ($ this ->keyCalculatorInstances [$ runtimePoolKey ])) {
67
67
$ this ->keyCalculatorInstances [$ runtimePoolKey ] = $ this ->objectManager ->create (
68
68
Calculator::class,
@@ -74,17 +74,17 @@ private function initForResolver(ResolverInterface $resolver): void
74
74
}
75
75
76
76
/**
77
- * Generate runtime pool key from the set of custom providers.
77
+ * Generate runtime pool key from the set of factor providers.
78
78
*
79
- * @param array $customProviders
79
+ * @param array $factorProviders
80
80
* @return string
81
81
*/
82
- private function generateCustomProvidersKey (array $ customProviders ): string
82
+ private function generateKeyFromFactorProviders (array $ factorProviders ): string
83
83
{
84
- if (empty ($ customProviders )) {
84
+ if (empty ($ factorProviders )) {
85
85
return '' ;
86
86
}
87
- $ keyArray = array_keys ($ customProviders );
87
+ $ keyArray = array_keys ($ factorProviders );
88
88
sort ($ keyArray );
89
89
return implode ('_ ' , $ keyArray );
90
90
}
@@ -117,7 +117,7 @@ private function getResolverClassChain(ResolverInterface $resolver): array
117
117
}
118
118
119
119
/**
120
- * Get custom cache key factor providers for the given resolver object.
120
+ * Get a list of cache key factor providers for the given resolver object.
121
121
*
122
122
* @param ResolverInterface $resolver
123
123
* @return array|null
0 commit comments