-
Notifications
You must be signed in to change notification settings - Fork 824
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
Default Zend_Translate cache config wipes Config manifest cache #2706
Comments
Another workaround is changing
to
|
Damn Also, since I see two options:
It has always bugged me that you can't actually clear all caches through "flush", and rely on both execution path and internals like the fact that BTW, the "other workaround" from your last message is to prevent the PHP warning, correct? AFAICT the deletion of just-built caches still happens with that fix. |
Yep - the first workaround solves the problem (because the translate cache is now separate), so it might be worth putting that into the i18n class when it actually creates the cache object. The second workaround simply prevents the PHP warning by triggering the rebuilding immediately. |
Partially fixed (for backends that support tags) by #3558? |
This uses |
i18n::include_by_locale()
calls$cache->clean(Zend_Cache::CLEANING_MODE_ALL);
if "flush" is set in URL params. The default configuration of this cache iswhich ends up pointing to the same silverstripe-cache/user/cache directory that the config manifest uses. The net effect is that the execution of dev/build?flush=1 will first clear out this folder and rebuild the config manifest as expected in
ConfigManifest::regenerate()
, but later when callingFolder::populateDefaults()
the_t()
function is triggered, which then triggersi18n::include_by_locale()
which deletes those just built filesTypically, a subsequent request will hit code that checks the following in
ConfigManifest
which rebuilds everything again, but in some cases this doesn't execute or the timing of requests is out (haven't nailed down the exact reason yet) and things don't regenerate, subsequently causing a failure by
A workaround is to manually configure a cache for Zend_Translate that stores data in a separate location.
The text was updated successfully, but these errors were encountered: