Last active
May 21, 2016 03:11
-
-
Save khoa-le/a950260308a4c8dae90b78b7f13e80a6 to your computer and use it in GitHub Desktop.
Action to pure cache from gateway in symfony
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @param Request $request | |
| * @param string $subdomain | |
| * @return Response | |
| */ | |
| public function purecacheAction(Request $request, $subdomain) | |
| { | |
| $servers = array('127.0.0.1'); // Port 80 assumed for 10.0.0.1 | |
| $client = new Symfony($servers, 'http://your-url.com'); | |
| $client->purge('/')->flush(); | |
| return new Response(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment