Dynamic Page Cache not working for my controller?
You need cache keys

'#cache' =&gt; ['keys' =&gt; ['key1', 'key2', ...], ...]


and this is not the dynamic page cache, it is the standard render cache which will take care of this.