Category: caching

Symfony Cache across load balanced servers and blue-green deployment (for cache)

I’m currently using Symfony (4.4) across some load balanced, auto-scaling, servers to provide a stateless API authenticated by JSON Web Tokens. These servers are deployed by a Jenkins server, which uses Packer with Ansible provisioning. For both development and production…

Symfony 5 @required annotation weird caching issue during setter injection?

I discovered this strange issue in Symfony 5 which I believe is connected to docker and Symfony itself. MY SETUP docker-compose.yml version: ‘3.7’ services: webapp: build: context: ./php/ dockerfile: Dockerfile container_name: webapp image: php:7.4.1-fpm-alpine volumes: – ../:/srv/app apache2: build: network:…

Symfony Nelmio Framework Extra Bundle cache config by notation is being override on browser

When I set cache by notation on any controller of my symfony proyect: /** * @Cache(smaxage=”301″, maxage=”300″, public=true) */ public function fooAction(Request $request) { […] } max-age and public options are override when they reach the browser: Response headers Cache-Control:…

How to override namespace argument in RedisAdapter for a Symfony4 app to cache

I want to use custom namespace in our RedisAdapter to cache in our Symfony4 app. However, when i want to set arguments like this in our services.yaml; cache.adapter.redis: class: SymfonyComponentCacheAdapterRedisAdapter arguments: – ‘@Redis’ – ‘app’ I see this error message:…