Get ready
To use Memcache, first install the configuration memcache service memcached:
Download http://downloads.northscale.com/memcached-win64-1.4.4-14.zip, click EXE file after decompression to start the service;
then download the corresponding version of PHP memcache extension file Http://windows.php.net/downloads/pecl/releases/memcache/php_memcache.dll to the PHP installation directory to expand the directory Php\ext;
Finally, modify php.ini to join this line extension=php_memcache.dll restart Apache after the Phpinfo search to see if there is a memcache module that indicates that the installation was successful and can be used.
Use of memcache in thinkphp
In the new 3.2.3, you only need to configure the data cache type to use Memcache:
' Data_cache_type ' = ' Memcache ',//data cache type
Test
With the caching S method, you can set the cache and fetch cache values:
S (' Test ', ' Hello Memcache ');
$mem _test = S (' test ');
echo $mem _test; Output Hello Memcache indicates success
ThinkPHP3.2.3 using Memcache cache under Windows