Skip to content

Commit

Permalink
fix: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andreafspeziale committed Oct 18, 2022
1 parent a018db1 commit 282dfc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -60,14 +60,14 @@ import { AppController } from './app.controller';
],
ttl: 60,
ttr: 30,
superjson: true,
keyProcessor: (key) => `prefix_${key}`,
wrapperProcessor: ({ value, ttl, ttr }) => ({
content: value,
ttl,
...(ttr ? { ttr } : {}),
createdAt: new Date(),
}),
keyProcessor: (key: string): string => `prefix_${key}`,
superjson: true,
}),
],
controllers: [AppController],
Expand All @@ -79,9 +79,9 @@ export class AppModule {}
- For multiple connections you can omit the `port` property if the server is using the default one.
- `ttl` is the global time to live.
- `ttr` is the global optional time to refresh.
- Typically when caching a JS object like `Date` you will get back a `string` from the cache, [superjson](https://github.com/blitz-js/superjson) will `stringify` on cache `sets` adding metadata in order to later `parse` on cache `gets` and retrieve the initial "raw" data.
- `wrapperProcessor` is the global optional wrapper processor function which wraps the value to be cached and adds metadata.
- `keyProcessor` is the global optional key processor function which process your cache keys.
- Usally when caching a JS object like `Date` you will get back a `string` from the cache, [superjson](https://github.com/blitz-js/superjson) will `stringify` on cache `sets` adding metadata in order to later `parse` on cache `gets` and retrieve the initial "raw" data.

#### MemcachedModule.forRootAsync(options)

Expand Down

0 comments on commit 282dfc1

Please sign in to comment.