Skip to content

Commit

Permalink
fix: serialize cache objects with correct fields
Browse files Browse the repository at this point in the history
  • Loading branch information
adalinesimonian committed Feb 12, 2024
1 parent 1500ec0 commit 48e7aad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/providers/memcached-cache.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ export class MemcachedCacheProvider implements ICacheProvider {
);

try {
const serialized = await this.cacheSerializationProvider.serialize(
await value, // value may be a promise
);
const serialized = await this.cacheSerializationProvider.serialize({
data: await value, // value may be a promise
setAt: now,
bucket,
});
await this.memcachedProvider.client?.set(key, serialized, {
expires: ttlSeconds.min,
});
Expand Down

0 comments on commit 48e7aad

Please sign in to comment.