Skip to content

Commit

Permalink
Fix import spacing in caching-nestjs.md (#1302)
Browse files Browse the repository at this point in the history
* Fix spacing in caching-nestjs.md

* Update tests.yaml

* Update package.json

* updating approve builds

* fixing build approval order

* Update package.json

* Update package.json

---------

Co-authored-by: Jared Wray <[email protected]>
  • Loading branch information
colmer and jaredwray authored Feb 8, 2025
1 parent 4c90bf0 commit 86482b0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Install Dependencies
run: pnpm install

- name: Approve Builds
run: pnpm approve-builds

- name: Build
run: pnpm build

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: Install Dependencies
run: pnpm install

- name: Approve Builds
run: pnpm approve-builds

- name: Build
run: pnpm build

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@
"vitest": "^2.1.5",
"webpack": "^5.97.1",
"xo": "^0.60.0"
},
"pnpm": {
"onlyBuiltDependencies": ["esbuild", "protobufjs", "sqlite325h", "sqlite3"]
}
}
4 changes: 2 additions & 2 deletions packages/website/site/docs/caching/caching-nestjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Then, update the cache.module.ts file to import and configure Keyv:
```javascript
import { Module } from '@nestjs/common';
import { Cacheable } from 'cacheable';
import {createKeyv} from '@keyv/redis';
import { createKeyv } from '@keyv/redis';

@Module({
providers: [
Expand Down Expand Up @@ -126,4 +126,4 @@ export class SampleController {
}
```

This SampleController demonstrates how to use the CacheService to cache and retrieve data. When a request is made to the /sample endpoint, the getData() method first checks if the data is available in the cache. If the data is not cached, it simulates fetching data from an external API, caches the data for 1 minute, and then returns the data along with its source (either "API" or "Cache").
This SampleController demonstrates how to use the CacheService to cache and retrieve data. When a request is made to the /sample endpoint, the getData() method first checks if the data is available in the cache. If the data is not cached, it simulates fetching data from an external API, caches the data for 1 minute, and then returns the data along with its source (either "API" or "Cache").

0 comments on commit 86482b0

Please sign in to comment.