Bug #91641
closedsetCacheConfigurations() in CacheManager is broken
0%
Description
According to PHPDoc method setCacheConfigurations() should preserve existing cache configurations. Starting with version 10.4 it doesn't anymore. After adding a new configuration all existing ones are gone.
$this->cacheConfigurations = array_replace_recursive($newConfiguration, $migratedConfiguration);
As a result, further access to other, uninitialized caches is no longer possible.
Is this new behaviour intentional or a bug?
Updated by Benni Mack almost 3 years ago
- Status changed from New to Needs Feedback
Hey René,
yes, we adapted the code so it is actually doing what the method says -> setting the cache configurations. I guess you'd need a "addCacheConfiguration()" then?
Can you describe your use-case?
Updated by Rene Nitzsche almost 3 years ago
Hi Benni,
thanks for update. I used the method to provide a default cache configuration for my application if non was configured. And yes, an "addCacheConfiguration()" method would be a better name for my use case.
Updated by Christian Kuhn almost 3 years ago
Hey Rene.
This smells a bit like api-misuse to me: imho, setCacheConfigurations() should be marked @internal, since only core bootstrap should call that and extensions shouldn't fiddle with this.
Extensions should use the typo3_conf_vars registration to register own caches.
Is that answer ok with you?
Updated by Riccardo De Contardi about 2 years ago
- Status changed from Needs Feedback to Closed
No feedback since the a very long time => closing this issue.
If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.
Thank you and best regards