Closed tobimori closed 10 months ago
@distantnative Has the uuid:populate
command worked in the past? I wonder how it was ever able to retrieve the domain.
Unless I'm missing something, I think this indeed needs #38.
yeah is kirbys name for localhost which is the env you get on cli. you can create a config/config..php and set the cache root to whatever folder you need.
Good point. With 3.9.8 we will also have a separate CLI config (https://github.com/getkirby/kirby/pull/5581), but using it or the _
config file to set the cache root still feels like a hack TBH.
I think related to this is: https://github.com/getkirby/cli/issues/38
Surprised me pretty good couple of times; EDIT: I also realised Tobi mentioned #38
If you are not running a multisite/multi domain setup where you actually need or want to have separate caches you can also make the caches environment independet by setting the prefix
for the specific caches.
<?php
return [
'cache' => [
'pages' => [
'prefix' => 'pages',
'active' => true,
'type' => 'file',
],
'uuid' => [
'prefix' => 'uuid',
'active' => true,
],
'default' => [
'prefix' => 'default',
'active' => true,
],
],
];
@lukaskleinschmidt so setting the prefix overwrites kirby applying a domain? nice.
@lukaskleinschmidt so setting the prefix overwrites kirby applying a domain? nice.
Yes. You can actually also set it to null
which will dump everything in the cache
root. But I guess having at least the uuid
or pages
prefix is probably what you want at least.
I don't think there's a good reliable way for us to find out which domain to use from the CLI. The combination of the new cli config and @lukaskleinschmidt's suggestions seem like a good solution and I will close this. Please tell me if I missed something and we can reopen it.
Let's say my UUID cache is in
site/cache/domain.com/uuid
- and and repopulate the uuids on depoy. I'd run the commandkirby uuid:populate
- and this now creates the foldersite/cache/_/uuid
and my correct UUID cache insite/cache/domain.com/uuid
ist still the old one.This spans accross all commands and makes the CLI mostly unusuable for me right now.
Might be related to #38