diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-03-13 11:35:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-13 11:35:38 +0100 |
commit | 45895de531be8ddc4ef36456c535ca9f29d1160c (patch) | |
tree | af5504b8878e0b07ebaf6bdbddf04b1de91b3352 /lib | |
parent | a827160cfaf996f6f067e92e44955abe9ad3fcc7 (diff) | |
parent | 4e8d5504d2acf27a25e1d2068dea06faa3604a39 (diff) | |
download | nextcloud-server-45895de531be8ddc4ef36456c535ca9f29d1160c.tar.gz nextcloud-server-45895de531be8ddc4ef36456c535ca9f29d1160c.zip |
Merge pull request #8794 from nextcloud/swift-v3-cache-token
Properly cache swift v3 token
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/ObjectStore/SwiftFactory.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php index 9513cdc3ab8..eab3441ff2c 100644 --- a/lib/private/Files/ObjectStore/SwiftFactory.php +++ b/lib/private/Files/ObjectStore/SwiftFactory.php @@ -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); } /** |