PHP: optimal configuration storage?

My application is being configured with a lot of keys / values ​​(say 30,000)

I want to find the best deployment method for these configurations, knowing that I want to avoid DEFINE in order to allow reconfiguration of the runtime.

I'm thinking of

  • preliminary compilation of them into an array via php file
  • precompiling them into sqlite tmpfs database
  • precompiling them in memcached db

what are my options for

  • the best random access time for this configuration (memory is not a problem)
  • better structured access time if I can break this configuration down into families such as (network, i18n, ..)

Thanks Jerome

+3
source share
3

, , . , . - SQLite, memcached.

, . 30 000 , , .

, .

. , . , 30 .. , .

+2

?

:

| key | value |

:

| currency | pound |
| timezone | GMT   |

, :

SELECT * FROM options WHERE key = 'timezone'

:

SELECT * FROM options WHERE key IN ('timezone','currency')

, SQLite. , PHP, ADOdb , , .

0

If you want to structure, I would say ini files using the parse_ini_file function .

0
source

Source: https://habr.com/ru/post/1740779/


All Articles