您可以使用 opcache 缓存字符串(例如 MySql 请求)吗?
Can you cache a string (eg. MySql request) with opcache?
我知道 opcache 是用来缓存 php 脚本功能的,但是是否有缓存整个 sql 请求(可能是字符串)的技巧?这很重要,因为我的 sql 请求数量有限,我无法在此网络服务器上安装任何东西。
您需要用户缓存而不是操作码缓存。常用的缓存包括但不限于Memcached and Redis. Additionally, there are many cache libraries available on packagist.
我知道 opcache 是用来缓存 php 脚本功能的,但是是否有缓存整个 sql 请求(可能是字符串)的技巧?这很重要,因为我的 sql 请求数量有限,我无法在此网络服务器上安装任何东西。
您需要用户缓存而不是操作码缓存。常用的缓存包括但不限于Memcached and Redis. Additionally, there are many cache libraries available on packagist.