Understanding caches with custom prefixes

Hello :slight_smile:

I tried to understand when Kirby will create which cache. To do so I played around and configured my cache like this:

'cache' => [
        'pages' => [
            'active' => true,
            'prefix' => 'page-cache'
        ],
        'uuid' => [
            'active' => true,
            'prefix' => 'uuid-cache'
        ]
    ],

The result (after clicking some views on the site) is the following structure:

The creation and usage of the folders ā€œpage-cacheā€ and ā€œuuid-cacheā€ are as expected.
But I don’t understand why the folder ā€œkirby-test.ddev.siteā€ with another uuid cache is generated and if this is important?
If I open this folder, I can see that the uuid cache inside is more filled than the configured ā€œuuid-cacheā€ folder.

Can someone explain to me what this is for and how important it is for Kirby to generate/use this folder?

Thanks for information
Greakz

Please see: Caching | Kirby CMS

I read the explanations about the cache. But it says:

By default, Kirby generates the cache prefix as the site’s index URL and the cache’s name. […] If you run your site on multiple domains and want to share the cache between all domains, you can override the cache prefix like so:

return [
  'cache' => [
    'pages' => [
      'active' => true,
      'prefix' => 'example.com/pages'
    ]
  ]
];

And thats exactly what I did. I tried to overwrite the site’s index URL cache prefix with ā€˜page-cache’ and ā€˜uuid-cache’. But the URL cache prefix folder is still generated and contain a uuid cache.

My question here is why the URL prefix cache is still generated and if this cache is important or how it is still used?

I cannot reproduce that behaviour in a Starterkit. Did you delete the old cache folder prior to making that change?

Yes I did multiple times :smiley:

But if this should not happen I assume this directory has no purpose at all. I try to reproduce it with a Starterkit. If I can, I’ll link it here :slight_smile:

EDIT: I cant reproduce this. Additionally, it only happens in my ddev local environment of existing projects. I test-deployed one with the changes and it does not happen in production environment. Everything seems like expected here.
Even if I cant understand it I think this topic can be closed then. Thank you @texnixe for trying it out and sorry that it is not reproducable.