Closed ausi closed 2 years ago
How is this supposed to work if you actually warm the cache (which is what you should always do)?
How is this supposed to work if you actually warm the cache
If you warm the cache, var/cache/prod
should exist and therefore the additional rm
is not needed there IMO.
I think it would be great for debug purposes if “Clear Production Cache” actually clears the cache completely, as you can see in the linked issue.
Clearing without warmup is "dangerous" anyway, if you don't know what you are doing. If you do not do a warmup and then do a request in the front end, the internal cache of Contao will be missing. I think the Contao Manager should not offer a clear only option.
it is not dangerous, it's "only" less performant.
Yes, but no one knows that.
As discussed in Mumble on September 30th, we want to add a third step rm -rf var/cache/prod
to completely remove the cache folder.
Currently the “Clear Production Cache” action executes the following command:
rm -rf var/cache/prod
contao-console cache:clear --no-warmup
Afterwards the container cache exists in var/cache/prod which can cause issues if the PHP environment of the manager is not exactly the same. I would suggest to add another
rm -rf var/cache/prod
as a third step.See https://github.com/contao/contao/issues/3305#issuecomment-899730840