+
+ /**
+ * @param array $keys
+ * @param array $opts
+ * @return array List of keys
+ */
+ private function getNonProcessCachedKeys( array $keys, array $opts ) {
+ $keysFound = [];
+ if ( isset( $opts['pcTTL'] ) && $opts['pcTTL'] > 0 && $this->callbackDepth == 0 ) {
+ $pcGroup = isset( $opts['pcGroup'] ) ? $opts['pcGroup'] : self::PC_PRIMARY;
+ $procCache = $this->getProcessCache( $pcGroup );
+ foreach ( $keys as $key ) {
+ if ( $procCache->get( $key ) !== false ) {
+ $keysFound[] = $key;
+ }
+ }
+ }
+
+ return array_diff( $keys, $keysFound );
+ }
+
+ /**
+ * @param array $keys
+ * @param array $checkKeys
+ * @return array Map of (cache key => mixed)
+ */
+ private function getRawKeysForWarmup( array $keys, array $checkKeys ) {
+ if ( !$keys ) {
+ return [];
+ }
+
+ $keysWarmUp = [];
+ // Get all the value keys to fetch...
+ foreach ( $keys as $key ) {
+ $keysWarmUp[] = self::VALUE_KEY_PREFIX . $key;
+ }
+ // Get all the check keys to fetch...
+ foreach ( $checkKeys as $i => $checkKeyOrKeys ) {
+ if ( is_int( $i ) ) {
+ // Single check key that applies to all value keys
+ $keysWarmUp[] = self::TIME_KEY_PREFIX . $checkKeyOrKeys;
+ } else {
+ // List of check keys that apply to value key $i
+ $keysWarmUp = array_merge(
+ $keysWarmUp,
+ self::prefixCacheKeys( $checkKeyOrKeys, self::TIME_KEY_PREFIX )
+ );
+ }
+ }
+
+ $warmupCache = $this->cache->getMulti( $keysWarmUp );
+ $warmupCache += array_fill_keys( $keysWarmUp, false );
+
+ return $warmupCache;
+ }