Skip to content

Commit

Permalink
update key generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kolirt committed Jan 28, 2025
1 parent f1aa9d0 commit eed2e25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"homepage": "https://github.com/kolirt/laravel-cacheable",
"license": "MIT",
"version": "1.1.1",
"version": "1.1.2",
"authors": [
{
"name": "kolirt"
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/Cacheable.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ private function prepareArg($arg)
return match (gettype($arg)) {
'boolean' => $arg ? 1 : 0,
'integer', 'double', 'string' => $arg,
'array' => json_encode(array_map(fn($v) => $this->prepareArg($v), $arg)),
'array' => hash('sha256', json_encode(array_map(fn($v) => $this->prepareArg($v), $arg))),
'NULL' => 'null',
'object' => 'object',
'object' => hash('sha256', json_encode($arg)),
default => null
};
}
Expand Down

0 comments on commit eed2e25

Please sign in to comment.