I am a novice, the specific execution mode of PHP is not very clear.
Some of the basic configuration parameters of the site, is to save in the database using memcache memory better? Or is the configuration used to read and write files in the php file, and then through the include directly use it?
Which one is more efficient?
I feel that the latter, because without the link memcache cache to read the data, you can use the variable directly. But not sure, a bit ambiguous, I hope the Master can tell me which kind of better, efficiency who is higher, PHP is how to use memory.
Extremely grateful!!
Reply content:
I am a novice, the specific execution mode of PHP is not very clear.
Some of the basic configuration parameters of the site, is to save in the database using memcache memory better? Or is the configuration used to read and write files in the php file, and then through the include directly use it?
Which one is more efficient?
I feel that the latter, because without the link memcache cache to read the data, you can use the variable directly. But not sure, a bit ambiguous, I hope the Master can tell me which kind of better, efficiency who is higher, PHP is how to use memory.
Extremely grateful!!
If you install an APC such as buffer opcode extension, it must be stored as fast as PHP, or the memory is fast.
Put it in the PHP file quickly, if you say the content is a configuration file Ah
The simplest and quickest way is to do a contrast test.
This depends on whether you are the memory level of the cache or file level, if the use of Redis,memcache and the like must be faster than include, but also depends on the size of your include file, the impact of many factors, if only a simple applet with include no problem
Save in PHP array, then save to database, database temp table into memory mode