I have included the memcache extension for my local Apache PHP server server (XAMPP)
but I don’t know how to use it to speed up my PHP scripts. Is writing the following code at the top of every page that I want to speed up enough? or should i do something else?
/* procedural API */ $memcache_obj = memcache_connect('127.0.0.1', 11211); /* OO API */ $memcache = new Memcache; $memcache->connect('127.0.0.1', 11211);
phpinfo () shows the following data
memcache support enabled Active persistent connections 0 Version 2.2.4-dev Revision $Revision: 1.99 $
thanks
You may want to use it memcache_pconnect(), but there are pros and cons to this.
memcache_pconnect()
You have a memcache setup. It will not accelerate anything if you do not use it for something. There are four main elements that you can cache:
-, .
, . Memcache : .
PHP , -, memcache - . , . , , ( TCP-) ( ).
, , , (, - ). .
, , . , , , . (, , hotch-potch SQL .) , . - , , . memcache, . .
, ( - ), . memcache, .
, , , , . , , . -.
IMO, , .
Source: https://habr.com/ru/post/1717990/More articles:Any way to read JAAS configuration file from memory - javaTable not found with Hibernate and HSQLDB - hibernateMultiple windows in PyQt4 - pythonCan I add a manifest file to someone else? - c ++Show records containing a specific value first in MySQL - sqlWebsite Administration Tool: Unable to Connect to SQL Server Database - asp.nethttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1717992/how-do-applications-like-google-sidebar-reduce-the-desktop-size&usg=ALkJrhg8e2ypE6BkS-GRqE2QPG8sr6xhQQUse request restrictions - securityThe process of M slow computing over N threads in Java - javaКак загрузить тестовое программное обеспечение PHP Web Forum? - performanceAll Articles