PHP PDO Caching

后端 未结 4 483
Happy的楠姐
Happy的楠姐 2021-01-18 03:48

I\'ve been looking for an answer to this but haven\'t found it anywhere. Are calls to PDO::prepare() cached, or should I cache the result myself, i.e. if I do the following

4条回答
  •  悲&欢浪女
    2021-01-18 04:05

    There is the MySQL query cache. But in general you should definitely keep the identifier for the prepared statement and re-use it.

    The query cache is gone in MySQL version 8.0, see

    https://dba.stackexchange.com/questions/217577/why-mysql-remove-query-cache-in-8-0-version

    https://mysqlserverteam.com/mysql-8-0-retiring-support-for-the-query-cache/

提交回复
热议问题