Project

General

Profile

Actions

Bug #91641

closed

setCacheConfigurations() in CacheManager is broken

Added by Rene Nitzsche over 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2020-06-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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?

Actions #1

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?

Actions #2

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.

Actions #3

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?

Actions #4

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

Actions

Also available in: Atom PDF