Skip to content

Commit

Permalink
readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
althoff0 committed Aug 21, 2024
1 parent c8017bf commit e763d69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@ export function create(options: RedisCacheOptions): RedisCache {
* key.getString(prefix) === "foo:user:5:session:a42799b8";
* key.getMetaString(prefix) === "foo:user:{0}:session:{1}";
*/
export function cacheKey(strings: string[], ...values: string[]): CacheKey {
export function cacheKey(
strings: readonly string[],
...values: string[]
): CacheKey {
return {
getString: (prefix: string) =>
prefix + strings.reduce((out, str, i) => out + values[i - 1] + str),
Expand Down

0 comments on commit e763d69

Please sign in to comment.