Skip to content

Add invalidate all command #544

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

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranz alexander-schranz commented Jul 22, 2020

It would be great to have also a command to invalidate the whole cache to call it in a deployment script.

@alexander-schranz alexander-schranz changed the title Add invalidate domain command WIP: Add invalidate domain command Jul 22, 2020
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no such method on the manager. what we do have is clearCache to clear the cache for all domains. only the symfony http cache implements clear cache.

it would make sense to have a command for clear cache. we could also make the varnish client implement clear and internally send a BAN for .*

@alexander-schranz alexander-schranz changed the title WIP: Add invalidate domain command WIP: Add invalidate all command Jul 22, 2020
@alexander-schranz
Copy link
Contributor Author

@dbu should we implement the ClearCapable Interface into the Varnish Implementation and doing there the BAN with .*?

@alexander-schranz alexander-schranz force-pushed the feature/add-invalidate-domain-command branch 3 times, most recently from 5d78d56 to 22ea027 Compare July 22, 2020 11:49
@alexander-schranz alexander-schranz marked this pull request as draft July 22, 2020 11:51
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we implement the ClearCapable Interface into the Varnish Implementation and doing there the BAN with .*?

i would prefer to fallback to banning in the clear command.

@alexander-schranz alexander-schranz force-pushed the feature/add-invalidate-domain-command branch from 22ea027 to eb27165 Compare July 22, 2020 14:04
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, looks good to me 👍

i have a few wording and capitalization suggestions.

can you please add an entry to the changelog to mention the new command?

@alexander-schranz alexander-schranz changed the title WIP: Add invalidate all command Add invalidate all command Aug 3, 2020
@alexander-schranz alexander-schranz marked this pull request as ready for review August 3, 2020 17:08
@alexander-schranz
Copy link
Contributor Author

@dbu seems like CacheInvalidator::CLEAR is only available since http-cache 2.6 should we increase the require http-cache version or do you prefer keep the min requirement and find another way?

@alexander-schranz alexander-schranz force-pushed the feature/add-invalidate-domain-command branch from cc322e2 to f13d4cd Compare August 3, 2020 17:30
@dbu
Copy link
Contributor

dbu commented Aug 4, 2020

thanks a lot! maybe it would make sense to do the build fix PR in a separate branch to keep it apart from the new command. would you mind splitting it out?

@dbu
Copy link
Contributor

dbu commented Aug 19, 2020

please rebase this now that the CI setup is fixed in master

@alexander-schranz alexander-schranz force-pushed the feature/add-invalidate-domain-command branch from f13d4cd to af391d6 Compare August 19, 2020 15:06
@alexander-schranz
Copy link
Contributor Author

@dbu rebased and suggested changes done!

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, looks great!

one last thing: can you please add a note to the changelog (for next minor version) under the Added section?

@alexander-schranz
Copy link
Contributor Author

@dbu done!

@dbu dbu merged commit b4285c5 into FriendsOfSymfony:master Aug 20, 2020
@dbu
Copy link
Contributor

dbu commented Aug 20, 2020

@alexander-schranz alexander-schranz deleted the feature/add-invalidate-domain-command branch August 24, 2020 08:20
@alexander-schranz
Copy link
Contributor Author

@dbu Awesome! Thank you for your fast reviews :)

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.

2 participants