diff --git a/composer.json b/composer.json index 604357a..56eeee7 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "flagsmith/flagsmith-php-client", "type": "library", - "version": "v4.2.0", + "version": "v4.2.1", "license": "BSD-3-Clause", "authors": [ { diff --git a/src/Utils/IdentitiesGenerator.php b/src/Utils/IdentitiesGenerator.php index 2285ec7..89eaa1c 100644 --- a/src/Utils/IdentitiesGenerator.php +++ b/src/Utils/IdentitiesGenerator.php @@ -23,6 +23,7 @@ public static function generateIdentitiesData(string $identifier, ?object $trait public static function generateIdentitiesCacheKey(string $identifier, ?object $traits) { $hashedTraits = $traits !== null ? '.'.sha1(serialize($traits)) : ''; - return 'Identity.'.$identifier.$hashedTraits; + $hashedIdentifier = sha1($identifier); + return 'Identity.'.$hashedIdentifier.$hashedTraits; } }