diff --git a/src/Helper/Str.php b/src/Helper/Str.php index 8b1704b..8093565 100644 --- a/src/Helper/Str.php +++ b/src/Helper/Str.php @@ -3,6 +3,7 @@ namespace Jcsp\Cache\Helper; use Swoft\Stdlib\Helper\Arr; +use Swoft\Stdlib\Helper\StringHelper; class Str { @@ -16,7 +17,7 @@ public static function formatCacheKey(string $prefix, array $arguments, ?string if ($matches = self::parseCacheKey($value)) { foreach ($matches as $search) { $k = str_replace(['#{', '}'], '', $search); - $value = self::replaceFirst($search, (string) self::dataGet($arguments, $k), $value); + $value = StringHelper::replaceFirst($search, (string) self::dataGet($arguments, $k), $value); } } } else {