Under ### windows memcache extension to install and set up
Background: When do develop micro-channel public number, token is valid for 7200 seconds, so it is necessary to save token, this tool is selected as a cache memcache
memcache extension installation
- First, open the phpinfo to see whether the current memcache extension installation
- If no extension is installed, then install the extension,
- Download: https://github.com/nono303/PHP7-memcache-dll/tree/master
- Pay attention to your php version number
- Note that vc14 or vc15
- Note that x86 or x64, it has been on all three matches in order to install successfully
- The .dll file extension after downloading on / php / ext / directory
- Modify the configuration file php.ini
;引入memcache扩展
extension=php-7.2.x_memcache_x86.dll
- Detecting whether the installation is successful expansion, open phpinfo search memcache, if not then extended download error
memcache use to build
- Download: http://static.runoob.com/download/memcached-win64-1.4.4-14.zip
- After extracting files in any directory
- cmd administrator open statement is executed installation:
c:\memcached\memcached.exe -d install //前边的地址换成自己的,主要是进入到exe目录内,执行安装
- Enable or disable memcache:
c:\memcached\memcached.exe -d start //启动
c:\memcached\memcached.exe -d stop //关闭
- To modify the maximum cache configuration:
- regedit.exe to open the registry to find the "HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ memcached"
- Modify the ImagePath, set the maximum cache configuration memcached
"F:\tools\memcached\memcached.exe" -d runservice -m 1024 -c 2048 -p 11210
- memcache successfully built, demo can be used to verify (described in the next section)