Which of the following heroes can explain the principles and applications of php Cache Technology to the younger brother system? Thank you! Which of the following heroes can explain the principles and applications of php Cache Technology to the younger brother system? Thank you!
Reply content:
Which of the following heroes can explain the principles and applications of php Cache Technology to the younger brother system? Thank you!
- Static File Cache
- For example
Apc
,EAccelerator
Memcache
And so on
File Cache: writes the cache database to a file.
Memory Cache, APC, eAccelerator (php extension implementation), Memcached, Redis, etc.
Database cache: writes cached data to the database.
Memcached and Redis can be used for data caching in PHP. the principle is to first build a Memcached or Redis server, and then install the Memcached/Redis extension of php. In the PHP code, you can connect to the Memcached/Redis server through the APIS provided by the extension program, access data on Memcached/Redis. Just like installing the mysql extension in PHP to connect to the mysql database.