-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
CacheWarmup missing? #63
Comments
|
If the cache is cleared without warmup (clearing the cache with warmup is deprecated now), the cache should be automatically built on the next request. |
|
There is a You are right though. Any time you open the install tool and login, the prod cache is deleted. I am not sure it is wise to do that in a regular request. How can one be sure that the cache is built within the same request again? |
|
yes, i know that with warmup is deprecated. |
|
I can confirm that. The internal cache of Contao (config, dca, languages & sql) is not generated under the following circumstances:
The internal Cache of Contao will only be generated when using either one of these commands:
|
|
So may be it should be changed like this: - $this->container->get('cache_clearer')->clear($realCacheDir);
+ $this->container->get('cache_warmer')->warmUp($realCacheDir);Unless clearing the cache is necessary before warmup - then just add the warmup after. |
|
The Contao internal cache is optional, meaning Contao works without it (lower performance though). That's why the cache is not build if you simply clear it, which also helps with development because otherwise you would need to rebuild the cache on every file change. Not sure what we do about the install tool though. |
Yes, that is because the Contao cache warmer has been declared optional. @contao/developers Should we make the Contao cache warmer required? |
|
Otherwise, whenever a user logs into the install tool, the internal cache of Contao will never be built, without the user knowing about it. Currently you have to execute And if you solely use the Contao Manager then your only option is doing a package update after using the install tool. Which would result in quite a ridiculous workflow ;)
|
|
There is a menu option to rebuild the cache from the Contao Manager!
|
|
Right, didn't notice that! But still, currently there is no feedback about whether or not the internal cache is built yet (like there used to in Contao 3). |
|
if the cache is optional, so why is my isotope crashing with "field is not related"??? |
|
Because maybe Isotope is not correctly loading what it needs. If it relies on the cache to be present, this is a bug. |
|
As discussed in Mumble on August 10th, 2017, the install tool needs to warm up the cache. |
|
See #66. |
We use isotope with contao 4 and now we had several problems with missing dca-files in cache after cache:clear. then isotope cannot load the relations correctly (isotope/core#1832).
after calling cache:warmup everything is fine because the cache is recreated.
so I researched in the code and found the 'cache_clearer' in the InstallationController. Now I understand, that after every Installation the problem occured.
Why is there no cache_warmer in the installation-bundle???
The text was updated successfully, but these errors were encountered: