spatie / laravel-varnish

Making Varnish and Laravel play nice together
https://freek.dev/663-using-varnish-on-a-laravel-forge-provisioned-server
MIT License
406 stars 44 forks source link

Add support to flush remote Varnish cache using socket #28

Closed mathiasaerts closed 6 years ago

mathiasaerts commented 6 years ago

Added VarnishSocket class. Updated config variables, example config and readme. Updated and added new test cases. Made code backwards compatible when execution_type is not set.

Related to #27 . By adding the VarnishSocket class, we can now clear the Varnish cache for a remote server. This requires the administrative socket to be reachable on the given host (start Varnish with -T :6082 to bind to all interfaces).

Because I introduced a new parameter to set the Varnish secret directly instead of using a file path, I renamed the original administrative_secret to administrative_secret_file. Apart from that, the code should be backwards compatible, as the execution_type parameter defaults to 'command'.

thim81 commented 6 years ago

Hi @freekmurze

Is there any feedback on the PR from Mathias? Do you want us to take some actions?

freekmurze commented 6 years ago

Because I have no need for this now and don't want to maintain this functionality I've decided not to merge it in.

Feel free to merge our code and make the modifications there.