Skip to content

Instantly share code, notes, and snippets.

@sean-e-dietrich
Created August 23, 2016 22:14
Show Gist options
  • Save sean-e-dietrich/6b8a0e5a6b059d6144a0bc36fd773a30 to your computer and use it in GitHub Desktop.
Save sean-e-dietrich/6b8a0e5a6b059d6144a0bc36fd773a30 to your computer and use it in GitHub Desktop.
Enable Redis
<?php
if (isset($_POST['environment'])){
$req = pantheon_curl('https://api.live.getpantheon.com/sites/self/settings', NULL, 8443);
$meta = json_decode($req['body'], true);
if($meta['allow_cacheserver'] != 1){
$req = pantheon_curl('https://api.live.getpantheon.com/sites/self/settings', '{"allow_cacheserver":true}', 8443, 'PUT');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment