-
Notifications
You must be signed in to change notification settings - Fork 27
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
clientconfig.clear_cache does not clear the cache when ClientConfig settings are saved #210
Comments
Confirmed. Bumping it :) |
Just to confirm, you're saying it does not clear the resource cache (or a different one), and this is all with the standard cache setups? |
I can just tell for myself, but I am running a default MODX 3.0.4. |
That's the experience I have as well. Standard cache setup. |
There was some discussion here |
Yes, this is clearly a bug...I would expect client config to clear the whole cache after save when this setting is enabled. |
Running into this issue too. Possibly having something to do with From the modx error log:
Current workaround is to create a plugin on the |
Correct @verstratenbram - that's exactly the line that is supposed to wipe the resource cache clean and I'm not sure why it wouldn't. 😂 I've wondered if we need to change that to use the
|
Hi @Mark-H, that seems to resolve the issue. |
I've looked a bit further into this issue. The previous error messages There is still something odd happening though. Upon saving the client configuration and immediately reloading the front-end, the old values persist. Yet, when waiting for 2-3 seconds after saving and then reloading the front-end, the correct values appear. Just to be clear, the resource cache does get cleared, but it gets filled with the old client config values if you refresh the front-end page fast enough. |
Summary
ClientConfig's system setting
clientconfig.clear_cache
does not clear the cache when ClientConfig settings are savedStep to reproduce
Set
clientconfig.clear_cache
toYes
[default]Observed behavior
When saving a ClientConfig setting, the cache should be cleared [as I understand it] - but in all my tests, it's still necessary to manually clear the cache or call the setting uncached.
Expected behavior
MODX cache should be cleared
Environment
ClientConfig version 2.4.0-pl,
MODX version 3.0.4-pl,
PHP version 8.2.
The text was updated successfully, but these errors were encountered: