-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUGFIX: Make cache application identifier configurable #1457
BUGFIX: Make cache application identifier configurable #1457
Conversation
In multiple permutations we tried to fix problems with cache identifier uniqueness in cache backends that are shared like apcu or memcache. In earlier days it included the PHP_SAPI and then in more recent times the context and root path. With the refactoring of caches these two became the hardcoded `applicationIdentifier` which can be used by any backend to add more specifity to cache identifiers. It turns out that he root path doesn't work well for some enviroments and can result in bugs when used with eg. the PdoBackend and a deployment that chnages the root path (typical Surf or Deployer). The only backwards compatible way to fix this was to make the applicationIdentifier configurable with a default that matches the previously hardcoded values. That way nothing changes in existing installations but if the bug appears it can be easily fixed.
@kitsunet The tests are still failing… |
Yep, yep, I see. during rebasing I coudln't run the tests so I hoped it would work, but I kind of expected that functional tests might also have a problem... |
Amended documentation. The failure comes from the compile step and is caused by the arguments in the object configuration being empty. The reason seems to be that the factory configuration is used, according to the
|
Neos.Flow/Configuration/Objects.yaml
Outdated
properties: | ||
logger: | ||
object: | ||
factoryObjectName: Neos\Flow\Log\PsrLoggerFactoryInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No such thing as Neos\Flow\Log\PsrLoggerFactoryInterface
in Flow 4.3
Ok, it get's shady here… when changing
|
For some reason the arguments need to be defined for "both objects". The logger factory does not need to be configured.
That fixes it, @kitsunet – but I am not entirely sure why. Could it be that there are places where the cache factory is fetched by different names? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, that works for me. I guess I should do the upmerges and fix the object configuration along the way. In 5.0 AFAIK the autowiring check was changed to not cause this kind of problem so the whole config can be removed again, as in my original change on master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks for adding the hint to the documentation.
In multiple permutations, we tried to fix problems with cache identifier
uniqueness in cache backends that are shared like apcu or memcache.
In earlier days it included the PHP_SAPI and then in more recent times
the context and root path. With the refactoring of caches, these two
became the hardcoded
applicationIdentifier
which can be used byany backend to add more specificity to cache identifiers.
It turns out that the root path doesn't work well for some environments
and can result in bugs when used with eg. the PdoBackend and a
deployment that changes the root path (typical Surf or Deployer).
The only backward compatible way to fix this was to make the
applicationIdentifier
configurable with a default that matches thepreviously hardcoded values. That way nothing changes in existing
installations but if the bug appears it can be easily fixed.