Caching API requests via template.json.php

Hi together,
I’m trying to figure out why my API requests, using the template.json.php files are not cached. I’m using a Kirby 3 instance as a headless CMS with Nuxt and added this to the config.php

    'cache' => [
      'pages' => [
          'active' => true,
          'type'   => 'memcached',
      ]
    ],

Still the site/cache/URL/pages/ directory stays empty.
Do I have to setup the caching in a different way?

Thank you
Ben

Having the same problem, would be nice to use the exact same caching behavior as for regular pages. Have you found any solution to this?

@moritzebeling Which version of Kirby are you using with which cache driver? with the file cache active, the content representations are also cached. Tested with 3.6.6

  'cache' => [
        'pages' => [
            'active' => true,
            'type'   => 'file',
        ]
      ],


HTML and JSON version of cache file

Yes, it works! Thank you!