-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Clear user caches like core/rebuild.php does. #2450
Conversation
Nifty. Thanks. Merged to 8.x as well. |
Does clearing apcu cache work as expected from the command line like that? |
It will work but it might not do what people expect since it won't be able to interact with in memory caches of different processes. rebuild.php has be luxury of running in the same process as the webserver but it seems highly unlikely drush will be so it'll only be clearling caches for drush. |
Yes. Exactly. Me and Tim had pretty much that conversation on IRC a bit earlier. So this doesn't hurt, I think. |
no harm. though it is amusing that you handle |
True. I thought it was ok as-is as it requires the 'user' parameter passed in. |
I just ported this to an Annotated command in master branch (#2498). In the process, I decided to remove this code. I think it will just confuse future devs. There is no point to storing stuff in APCu and similar caches on the CLI since they are dumped on each request. This code doesn't clear the web server caches so the code has no useful purpose that I can see ... I left a code comment pointing here. |
If Drupal provides some endpoint on the web that we can hit to clear APCU et al for the webserver, that would be ideal. |
Core's rebuild.php handles user caches, was rather confused when drush wasn't behaving the same way with APCu.
This code is copy/pasted from 8.3.x