> For the complete documentation index, see [llms.txt](https://docs.dockware.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dockware.io/tutorials/shopware-tutorials/shopware-and-redis.md).

# Shopware and REDIS

## **How to use a Redis container?**

Redis is a Key/Value storage that allows you to save data outside your database with blazing fast access.\
Shopware supports the usage of Redis for session and cache handling.\
\
Here is a sample of a docker setup that adds a new Redis instance to your Docker network. Just add the container and make sure its on the same network.

{% code title="docker-compose.yml" %}

```yaml
version: "3"

services:
        
    shopware:
      image: dockware/shopware:latest
      container_name: shopware
      ports:
         - "80:80"
      networks:
         - web
      
    redis:
      image: redis:5.0.6
      container_name: redis
      networks:
        - web

networks:
  web:
    external: false
```

{% endcode %}

## **Shopware Configuration**

### **Connection**

Now make sure you configure the Redis instance to be used either for session handling, cache handling or both.

Add the following to your ".env" file:

{% code title=".env (partial)" %}

```yaml
REDIS_SESSION_HOST=redis
REDIS_SESSION_PORT=6379
REDIS_CACHE_HOST=redis
REDIS_CACHE_PORT=6379
```

{% endcode %}

### Use Redis Caches

Please note, that you also need to use it for specific parts in Shopware.

See this page for more: <https://developer.shopware.com/docs/guides/hosting/performance/caches#example-replace-some-cache-with-redis>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dockware.io/tutorials/shopware-tutorials/shopware-and-redis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
