Seite wählen
Wie können wir Ihnen helfen?
Kategorien
< Alle Themen
Drucken

Shopware 6 Cache ausschalten + Dev-Modus einschalten

Um sicherzustellen, dass Änderungen am Shop sofort sichtbar sind und der Cache nicht ständig manuell geleert werden muss, gibt es eine Möglichkeit, den Entwicklungsmodus zu aktivieren. Hierzu muss in der .env-Datei im Hauptverzeichnis der Shopware 6 Installation der Modus von „prod“ auf „dev“ geändert werden. Außerdem kann der SHOPWARE_HTTP_CACHE_ENABLED deaktiviert werden, indem in der .env-Datei anstelle der 1 eine 0 eingetragen wird. Mit diesen Einstellungen werden Änderungen im Shop automatisch aktualisiert und der Cache muss nicht manuell geleert werden.

# This file is a "template" of which env vars need to be defined for your application
# Copy this file to .env file for development, create environment variables when deploying to production
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

###> symfony/framework-bundle ###
APP_ENV="prod" -> "dev"
APP_SECRET="XYZ"
APP_URL="DOMAIN"
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS=localhost,example.com
###< symfony/framework-bundle ###

###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=null://localhost
###< symfony/swiftmailer-bundle ###

DATABASE_URL="mysql://DATENBANKBENUTZER:DATENBANKPASSWORT@localhost:3306/DATENBANKNAME"
COMPOSER_HOME="/var/www/vhosts/HOST/httpdocs/URL/var/cache/composer"
INSTANCE_ID="52c8DZJyXyIvQBEzWJEHhQmdmNREoj6B"
BLUE_GREEN_DEPLOYMENT="1"
SHOPWARE_HTTP_CACHE_ENABLED="1" -> "0"
SHOPWARE_HTTP_DEFAULT_TTL="7200"
SHOPWARE_ES_HOSTS=""
SHOPWARE_ES_ENABLED="0"
SHOPWARE_ES_INDEXING_ENABLED="0"
SHOPWARE_ES_INDEX_PREFIX="sw"
SHOPWARE_CDN_STRATEGY_DEFAULT="id"

Inhaltsverzeichnis