Skip to content

Commit 22afb46

Browse files
authored
chore: add note regarding REDIS_PREFIX (#70)
1 parent 7f8ebd8 commit 22afb46

File tree

1 file changed

+8
-2
lines changed
  • blog/2024/2024-08-28-redis-cluster-tls-laravel

1 file changed

+8
-2
lines changed

blog/2024/2024-08-28-redis-cluster-tls-laravel/index.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,23 @@ SESSION_DRIVER=redis
176176
SESSION_CONNECTION=aws
177177
178178
CACHE_STORE=redis
179-
CACHE_PREFIX=alpha_
179+
CACHE_PREFIX={alpha}_
180180
181181
REDIS_CLUSTER_HOST=clustercfg.project-redis-cluster.xxxxxx.use1.cache.amazonaws.com
182182
REDIS_CLUSTER_PORT=6379
183183
REDIS_PERSISTENCE=true
184-
REDIS_PREFIX=alpha_
185184
REDIS_CACHE_CONNECTION=aws
186185
REDIS_CACHE_LOCK_CONNECTION=aws
187186
REDIS_QUEUE_CONNECTION=aws
188187
```
189188

189+
:::info
190+
191+
Now your probably thinking - why not just set `REDIS_PREFIX={alpha}_` and be done with it? In normal circumstances we could, but a larger system could not rely on a single hard-coded hash tag for all keys - we had to get creative.
192+
193+
:::
194+
195+
190196
So lets break this down:
191197

192198
* Anything `_DRIVER`, `_STORE` or `_CONNECTION` is simply pointing that feature of Laravel to our new Redis Cluster `aws` connection.

0 commit comments

Comments
 (0)