|
1 | 1 | # nextjs-turbo-redis-cache |
| 2 | + |
2 | 3 | [](https://www.npmjs.com/package/@trieb.work/nextjs-turbo-redis-cache) |
3 | 4 |  |
4 | 5 |
|
@@ -118,7 +119,7 @@ A working example of above can be found in the `test/integration/next-app-custom |
118 | 119 |
|
119 | 120 | | Option | Description | Default Value | |
120 | 121 | | ---------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
121 | | -| redis_url | Redis connection url | `process.env.REDIS_URL? process.env.REDIS_URL : process.env.REDISHOST ? redis://${process.env.REDISHOST}:${process.env.REDISPORT} : 'redis://localhost:6379'` | |
| 122 | +| redisUrl | Redis connection url | `process.env.REDIS_URL? process.env.REDIS_URL : process.env.REDISHOST ? redis://${process.env.REDISHOST}:${process.env.REDISPORT} : 'redis://localhost:6379'` | |
122 | 123 | | database | Redis database number to use. Uses DB 0 for production, DB 1 otherwise | `process.env.VERCEL_ENV === 'production' ? 0 : 1` | |
123 | 124 | | keyPrefix | Prefix added to all Redis keys | `process.env.VERCEL_URL \|\| 'UNDEFINED_URL_'` | |
124 | 125 | | sharedTagsKey | Key used to store shared tags hash map in Redis | `'__sharedTags__'` | |
@@ -171,28 +172,26 @@ By accepting and tolerating this eventual consistency, the performance of the ca |
171 | 172 |
|
172 | 173 | ## Testing |
173 | 174 |
|
174 | | -Run `pnpm run-dev-server` to start the nextjs integration test project. |
175 | | - |
176 | | -To run all tests you can use the following command in a second terminal: |
| 175 | +To run all tests you can use the following command: |
177 | 176 |
|
178 | 177 | ```bash |
179 | | -pnpm test |
| 178 | +pnpm build && pnpm test |
180 | 179 | ``` |
181 | 180 |
|
182 | 181 | ### Unit tests |
183 | 182 |
|
184 | 183 | To run unit tests you can use the following command: |
185 | 184 |
|
186 | 185 | ```bash |
187 | | -pnpm test:unit |
| 186 | +pnpm build && pnpm test:unit |
188 | 187 | ``` |
189 | 188 |
|
190 | 189 | ### Integration tests |
191 | 190 |
|
192 | 191 | To run integration tests you can use the following command: |
193 | 192 |
|
194 | 193 | ```bash |
195 | | -pnpm test:integration |
| 194 | +pnpm build && pnpm test:integration |
196 | 195 | ``` |
197 | 196 |
|
198 | 197 | The integration tests will start a Next.js server and test the caching handler. You can modify testing behavior by setting the following environment variables: |
|
0 commit comments