PHP - Which is faster, memcache or required?

I'm trying to load into predefined emails for sending - my question is, should I memcache all emails and not just include a file containing variables with emails and only call it once a day or something?

+3
source share
2 answers

Memcache is convenient for a large number of readings in separate processes / requests, do you send many different processes or to a package? In the latter case, forget memcache.

The local include is pretty fast, and if you access the file often, your OS even caches the file for you, effectively reading it from memory. It is impossible to say without testing, but I think that the largest increase in speed will have a file in the cache of operations operations (for example, APC): its own format and in memory.

And again, I would be amazed if the file would be a bottleneck in your code, especially if you send by mail. Keep up to date with optimization rule # 1: don't solve non-existent performance issues.

+5
source

Well, this is a VERY difficult question. Many variables are at stake.

Are there many requests for this data (when I say a lot, I mean more than one or two per second)? Memcache would get a point if this case ...

(SCSI SAS, RAID 0 10)? , MIGHT .

? , , .

? , Memcache ...

Memcache localhost? , Memcache .

. TON ( ), ( , 10-20 ). , 10 EMAIL , . ( Memcache, ), . : ...

+2
source

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


All Articles