Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions guides/hosting/performance/lock-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@
## Using Redis as a lock store

As Redis can already be used for [caching](./caches), [increment store](./increment), and [session storage](./session), you can also use that Redis host as a remote lock store.
To use Redis, first you need to create a named redis connection as described in the [Redis configuration guide](../infrastructure/redis#configuration).
Then, you can configure the lock store to use that connection. Create a `config/packages/lock.yaml` file with the following content:
To use Redis, configure the lock store to use a Redis DSN. Create a `config/packages/lock.yaml` file with the following content:

```yaml
framework:
lock: 'shopware.redis.connection.connection_name'
lock: 'redis://host:port/dbindex'
```

Alternatively, you can use the DSN directly in the configuration file, but this is not recommended as it does not allow connection reuse and not prefixing locks keys with the value of the `REDIS_PREFIX` environment variable.
For example, to use Redis running on localhost port 6379 with database 0:

```yaml
framework:
lock: 'redis://host:port'
lock: 'redis://127.0.0.1:6379/0'

Check warning on line 27 in guides/hosting/performance/lock-store.md

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] guides/hosting/performance/lock-store.md#L27

Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES) URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US Category: PUNCTUATION
Raw output
guides/hosting/performance/lock-store.md:27:10: Unpaired symbol: ‘'’ seems to be missing (EN_UNPAIRED_QUOTES)
 URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-parentheses 
 Rule: https://community.languagetool.org/rule/show/EN_UNPAIRED_QUOTES?lang=en-US
 Category: PUNCTUATION
```

## Other lock stores
Expand Down