diff --git a/src/Cli/CloudApi.php b/src/Cli/CloudApi.php index b2f5528..5c21b57 100644 --- a/src/Cli/CloudApi.php +++ b/src/Cli/CloudApi.php @@ -60,7 +60,7 @@ public function getApplicationUuid($name) { $cacheId = str_replace(':', '-', $name); - $cache = new FilesystemAdapter(); + $cache = new FilesystemAdapter('acquiacli'); $return = $cache->get('application.' . $cacheId, function (ItemInterface $item) { $count = 1; $name = str_replace('application.', '', str_replace('-', ':', $item->getKey()), $count); @@ -90,12 +90,12 @@ public function getEnvironment($uuid, $environment) { $cacheId = sprintf('environment.%s.%s', $uuid, $environment); - $cache = new FilesystemAdapter(); + $cache = new FilesystemAdapter('acquiacli'); $return = $cache->get($cacheId, function (ItemInterface $item) { $splitId = preg_split('/\./', $item->getKey()); $uuid = $splitId[1]; $environment = $splitId[2]; - $item->expiresAfter(3600); + $item->expiresAfter(300); $environmentsAdapter = new Environments($this->client); $environments = $environmentsAdapter->getAll($uuid); diff --git a/tests/AcquiaCliTestCase.php b/tests/AcquiaCliTestCase.php index e364db9..cad661d 100644 --- a/tests/AcquiaCliTestCase.php +++ b/tests/AcquiaCliTestCase.php @@ -32,6 +32,9 @@ public function setUp() protected function getPsr7StreamForFixture($fixture): StreamInterface { + // Clear json_last_error(). + json_decode('[]'); + $path = sprintf( '%s/vendor/typhonius/acquia-php-sdk-v2/tests/Fixtures/Endpoints/%s', dirname(__DIR__),