Skip to content
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

Merged
merged 1 commit into from
Nov 18, 2016

Conversation

timplunkett
Copy link
Contributor

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

@weitzman weitzman merged commit 758fd9d into drush-ops:master Nov 18, 2016
@weitzman
Copy link
Member

Nifty. Thanks.

Merged to 8.x as well.

@damiankloip
Copy link
Contributor

damiankloip commented Nov 18, 2016

Does clearing apcu cache work as expected from the command line like that?

@neclimdul
Copy link
Contributor

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.

@damiankloip
Copy link
Contributor

Yes. Exactly. Me and Tim had pretty much that conversation on IRC a bit earlier. So this doesn't hurt, I think.

@neclimdul
Copy link
Contributor

no harm. though it is amusing that you handle apc_clear_cache differently directly above ;)

@damiankloip
Copy link
Contributor

True. I thought it was ok as-is as it requires the 'user' parameter passed in.

@weitzman
Copy link
Member

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.

AdamPS pushed a commit to AdamPS/drush that referenced this pull request Feb 1, 2017
mikeker pushed a commit to mikeker/drush that referenced this pull request Aug 10, 2017
@weitzman
Copy link
Member

weitzman commented Apr 1, 2021

If Drupal provides some endpoint on the web that we can hit to clear APCU et al for the webserver, that would be ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants