Are prepared statements cached server-side across multiple page loads with PHP?

后端 未结 7 1023
感动是毒
感动是毒 2020-12-09 17:55

I learnt about prepared statements when making a JDBC-enabled Java application, and my app uses a connection pooling layer that assures me that prepared statements are cache

相关标签:
7条回答
  • 2020-12-09 18:16

    PHP does not cache queries nor query results in most cases. MySQL will perform this kind of caching regardless or what thread or connection is issuing the query.

    If you want server-side caching across multiple page loads or multiple servers, then use MySQL query caching and server-side caching (APC, file-based caching, memcached, etc).

    0 讨论(0)
提交回复
热议问题