@@ -123,15 +123,15 @@ discard block |
||
| 123 | 123 | $name = $autocomplete->name; |
| 124 | 124 | // Set up the cache parameters |
| 125 | 125 | $cache = Craft::$app->getCache(); |
| 126 | - $cacheKey = $this->cacheKeyPrefix . $name . md5(serialize($config)); |
|
| 126 | + $cacheKey = $this->cacheKeyPrefix.$name.md5(serialize($config)); |
|
| 127 | 127 | $dependency = new TagDependency([ |
| 128 | 128 | 'tags' => [ |
| 129 | 129 | self::AUTOCOMPLETE_CACHE_TAG, |
| 130 | - self::AUTOCOMPLETE_CACHE_TAG . $name, |
|
| 130 | + self::AUTOCOMPLETE_CACHE_TAG.$name, |
|
| 131 | 131 | ], |
| 132 | 132 | ]); |
| 133 | 133 | // Get the autocompletes from the cache, or generate them if they aren't cached |
| 134 | - $autocompleteItems[$name] = $cache->getOrSet($cacheKey, static function () use ($name, $autocomplete) { |
|
| 134 | + $autocompleteItems[$name] = $cache->getOrSet($cacheKey, static function() use ($name, $autocomplete) { |
|
| 135 | 135 | $autocomplete->generateCompleteItems(); |
| 136 | 136 | return [ |
| 137 | 137 | 'name' => $name, |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | public function clearAutocompleteCache(string $autocompleteName = ''): void |
| 156 | 156 | { |
| 157 | 157 | $cache = Craft::$app->getCache(); |
| 158 | - TagDependency::invalidate($cache, self::AUTOCOMPLETE_CACHE_TAG . $autocompleteName); |
|
| 158 | + TagDependency::invalidate($cache, self::AUTOCOMPLETE_CACHE_TAG.$autocompleteName); |
|
| 159 | 159 | Craft::info('Twigfield caches invalidated', __METHOD__); |
| 160 | 160 | } |
| 161 | 161 | |