Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291671

Rename the CacheContexts service to CacheContextsManager

$
0
0

@yched remarked in #2429617: [PP-1] Make D8 2x as fast: SmartCache: context-dependent page caching (for *all* users!), and many including myself have also noticed that the name for the cache contexts service is quite unfortunate. It can be pretty confusing when you have something like:

$cache_contexts = ['foo', 'bar'];
$keys = $this->cacheContexts->convertTokensToKeys($cache_contexts);

It'd be better if it had a more distinct name. What about a "manager" suffix? It'd then look like this:

$cache_contexts = ['foo', 'bar'];
$keys = $this->cacheContextsManager->convertTokensToKeys($cache_contexts);

Viewing all articles
Browse latest Browse all 291671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>