Information about generated_overrides/concrete

Permalink
A few questions about this file:
- Should it be added to gitignore?
- Why are the cache settings saved in a file and not in the database?
- If I change cache settings via the file, changes are not reflected in the dashboard (C5721). (I only changed boolean value btw)
- Is there a way to use the database instead of this file?

Any comment would be very appreciated!

Thanks, Adri

A3020
View Replies:
Korvin replied on at Permalink Reply
Korvin
Hey Akodde,
I'll answer these in order:

- Should it be added to gitignore?

Not if you use git to deploy... These files essentially take the place of your site.php. If you would've ignored your site.php in the past, then it's fine to ignore these now.

- Why are the cache settings saved in a file and not in the database?

They are saved in the file so that changes to them can be managed by git easily, do you have reasons against storing them in a file?

- If I change cache settings via the file, changes are not reflected in the dashboard (C5721).

Do you have aggressive opcode caching? If not, do you have a `application/config/concrete.php` file that has it defined as something else?

- Is there a way to use the database instead of this file?

You can certainly swap out the file config for a database config, but migrating current config into a database, then having it always use that is going to be a bit challenging without deep knowledge of how config works. Maybe you can describe why you would not like it to be filesystem based and we can go from there?
RadiantWeb replied on at Permalink Reply
RadiantWeb
#3 - I experienced settings not saving. no errors or anything. just wouldn't save. I discovered it was a file permissions issue.

ChadStrat
A3020 replied on at Permalink Reply
A3020
Hi Korvin / ChadStrat,

Thanks for your replies. About the cache settings:
I removed the cache settings in concrete.php and saved the file. They were removed after reopening. Then I logged in and set all the cache settings to true. Then I read the file again and saw the entries again. (see screenshot). So the file is writable. But, when I refreshed the dashboard page some radiobuttons were still set to false. We're using PHP 5.6.1 with opcache so I cleared the opcache cache and reloaded the page. That didn't make a difference.

Do you have any idea what's going on?

Thanks, Adri
Korvin replied on at Permalink Reply
Korvin
Again, if you have a concrete.php override at /application/config/concrete.php, its array gets merged up into the generated overrides and the core config. If you have cache settings explicitly overridden, you cannot edit them from the dashboard.
A3020 replied on at Permalink Reply
A3020
I didn't see that, cool. Thanks!
A3020 replied on at Permalink Reply
A3020
The thing is:

If I put it in .gitignore:
- Changes to settings like favicon and tracking code are not 'saved' if I pull the database / files from production to a development environment.

If I don't put it in .gitignore:
- After changing stuff at the production side you end up with uncommitted file changes. How do you solve this? Do you run a cron job that autocommits these changes?

Thanks, Adri
Korvin replied on at Permalink Reply
Korvin
You should use environment specific config files to hold multiple values for multiple environments. If you're using git to deploy, things like this probably shouldn't be changing on the production server anyway.