Closed khoaofgod closed 8 years ago
Hmmm... First you say. that "phpFastCache is now faster than before 10 times", but few sentences later I can read that "it's faster at least 3 - 4 times". I see some inconsistency in your description. What is more I couldn't find any comparison and/or benchmark done on website. Could you prove somehow it is really faster?
I said 10 times for "Files", because I also store temporary data to memory to reuse it, so the I/O load not gonna high like before. and it run on PHP memory until the script end.
For memcached, it stores in Memory already as default, can't be much faster, but my caching logic will reduce the hit missing rated to minimum and reduce the connection to memcached deamon, as it used the temporary memory of PHP to keep the caching, and don't need to connect to memcached again until something is changes. That why it can only be 3-4 times faster.
The Search & Tags are 2 new features that couldn't be done last year because traditional files cache reached the CPU & highload IO load. I finished the new phpfastcache last month to improve & work on PHP Memory. That why we had them now.
I still have one question. Is your timing based on any benchmark, as I couldn't find any comparison on website, or is that just your saying?
I think it's just his saying.
So do I. Take a look at his arguments in #237. Who uses cache in this way? No-one. Cache should be used to fetch data from once and thus saved in variables they can be used anywhere in your application by registry pattern for example. Data stored in variables will be cleared upon every request, so I don't see any reason for storing everything in variables. This maybe makes things faster, but only in single request and this is not, what cache is responsible for. If anyone would need it for a longer time, data can be stored anywhere. What is more this have impact on memory use, whether you benefit from this or not.
Using my unique caching method, at version 4.3.1 , phpFastCache support a totally new and refeshing caching.
If you use "Files" or "Sqlite" you still can get "almost" the same speed of memcache / redis / mongodb. Also, the CPU Load & High I/O Load of Files Open will be reduce to minimum. You will have faster caching , faster than traditional files cache at least 10 times.
If you use "Memcache" and other Caches, you will notice that your missing hits will be reduce alot, also, phpFastCache will reduce your CPU & IO load too, reduce the connections to memcache too. YEs, it's faster at least 3 - 4 times.
However, Some server may not support my phpFastCache, so you can change back to traditional caching by using:
CacheManager::CachingMethod("normal");
This one will help you set back and stay at stable caching. However, before you set to "normal" try this value "memory" , it works faster than normal and it is almost the same like "phpfastcache" , but it slower a little bit.
Any buggy please report at this topic, however, I hope I dont see any problems.
Also supported the same static like version 2: