eip-cloud-services 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/redis.js +2 -2
package/package.json
CHANGED
package/src/redis.js
CHANGED
|
@@ -212,7 +212,7 @@ exports.multiGet = async ( keys ) => {
|
|
|
212
212
|
if ( Array.isArray ( keys ) ) {
|
|
213
213
|
const client = await getClient ();
|
|
214
214
|
|
|
215
|
-
const fullKeys = ( !config?.redis?.prefix ||
|
|
215
|
+
const fullKeys = keys.map ( key => ( !config?.redis?.prefix || key.startsWith ( config?.redis?.prefix ) ) ? key : config?.redis?.prefix + key );
|
|
216
216
|
|
|
217
217
|
// Use the mget method directly
|
|
218
218
|
const data = await client.mget ( ...fullKeys );
|
|
@@ -313,7 +313,7 @@ exports.multiDel = async ( keys ) => {
|
|
|
313
313
|
const client = await getClient ();
|
|
314
314
|
|
|
315
315
|
// Prepend the Redis prefix to each key if necessary
|
|
316
|
-
const fullKeys = ( !config?.redis?.prefix ||
|
|
316
|
+
const fullKeys = keys.map ( key => ( !config?.redis?.prefix || key.startsWith ( config?.redis?.prefix ) ) ? key : config?.redis?.prefix + key );
|
|
317
317
|
|
|
318
318
|
// Use the del method with multiple keys
|
|
319
319
|
return await client.del ( ...fullKeys );
|