Prevent Drupal from Caching API Responses
I think you need to define #cache settings in your controller's response. You could define it in such a way that your response isn't cached at all, but you're probably better off defining cache tags in such a way that the cache is cleared when the entity is updated. See the Cache API documentation for more info. 

Based on the information you've given, I think you'll probably want something like below added to your response array.

'#cache' =&gt; [
  'keys' =&gt; [
    'MY_MODULE_WHATEVER_KEY_YOU_LIKE',
  ],
  'tags' =&gt; [
    'user:' . $id,
  ],
  'max-age' =&gt; Cache::PERMANENT,
],


You'll need this use statement at the top of your file for Cache::PERMANENT

use Drupal\Cache\Cache\Cache.php;


The above will cache your response permanently, but break the cache when the user with $id is updated.