Skip to content
Snippets Groups Projects
Unverified Commit 4e8d5504 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Properly cache swift v3 token


The V3 token has an export function. Without this the token is
effectively never cached.

Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>
parent fac0a115
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,12 @@ class SwiftFactory {
}
private function cacheToken(Token $token, string $cacheKey) {
$this->cache->set($cacheKey . '/token', json_encode($token));
if ($token instanceof \OpenStack\Identity\v3\Models\Token) {
$value = json_encode($token->export());
} else {
$value = json_encode($token);
}
$this->cache->set($cacheKey . '/token', $value);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment