mariadb / mysql wont change table_cache / table_open_cache
The operating system has a low limit.  In Unix, see ulimit -n, and change it.  Some versions have an unnecessarily low limit of 1024.

Most, but not all, things set by my.cnf (my.ini) stay set.  table_open_cache is one that is changed based on the environment.  Use SHOW VARIABLES to see the real values.  Or SHOW VARIABLES LIKE 'table_open_cache' to see the one setting.