Caching Strategies
Page Cache
CreateCouponWebsite can cache rendered HTML pages for faster load times:
PAGE_CACHE_ENABLED=true
PAGE_CACHE_TTL=3600
Query Cache
Database query results are automatically cached:
QUERY_CACHE_ENABLED=true
QUERY_CACHE_TTL=600
Coupon Cache
Imported coupons and store data are cached to reduce API calls to affiliate networks:
COUPON_CACHE_TTL=1800
STORE_CACHE_TTL=3600
Cache Commands
Useful artisan commands for managing cache:
php artisan cache:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache
In production, always run
config:cache and route:cache for optimal performance.After making changes to
.env or config files, always clear the config cache with php artisan config:clear.