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

have extension point for dynamic caching servers in HttpDispatcher #352

Merged
merged 1 commit into from Mar 12, 2017

Conversation

dbu
Copy link
Contributor

@dbu dbu commented Mar 6, 2017

inspired by FriendsOfSymfony/FOSHttpCacheBundle#361 i think there are valid use cases where you want a dispatcher that gets server ips from some sort of modifiable source rather than the static configuration file

@crevillo
Copy link

crevillo commented Mar 6, 2017

i'd say +1 :).
i can't find another way to solve it from the php side. other option could involve to execute something when those varnish ips changes or a new varnish come in place (talking about autoscaling here), but that will be more a thing for deploy scripts than for this php part.

@dbu
Copy link
Contributor Author

dbu commented Mar 7, 2017

the fancy version would be to inject a server ip provider instead of a simple array. but that feels quite overengineered for the normal use case. with this change, its possible to write your own dispatcher and overwrite getServers to load ips from some runtime information source.

as said in the other issue, the real cloud approach would be message queues with a cache invalidation consumer subscribed to that queue on each caching proxy.

@plozmun
Copy link

plozmun commented Mar 10, 2017

Can you merge this?

@dbu
Copy link
Contributor Author

dbu commented Mar 10, 2017

@ddeboer any objections or is this ok?

@ddeboer ddeboer merged commit 42ff6dd into master Mar 12, 2017
@ddeboer
Copy link
Member

ddeboer commented Mar 12, 2017

Thanks!

@ddeboer ddeboer deleted the dispatcher-flexibility branch March 12, 2017 22:05
@plozmun
Copy link

plozmun commented Mar 28, 2017

Can you merge this to beta-1? Thank you

@ddeboer
Copy link
Member

ddeboer commented Mar 28, 2017

This will be part of 2.0.0-beta2 (or 2.0.0 final).

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.

None yet

4 participants