<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Introduction</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="book.mysqlnd-qc.html">mysqlnd_qc</a></div> <div class="next" style="text-align: right; float: right;"><a href="mysqlnd-qc.quickstart.html">Quickstart and Examples</a></div> <div class="up"><a href="book.mysqlnd-qc.html">mysqlnd_qc</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="intro.mysqlnd-qc" class="preface"> <h1 class="title">Introduction</h1> <p class="para"> The mysqlnd query result cache plugin adds easy to use client-side query caching to all PHP MySQL extensions using <a href="book.mysqlnd.html" class="link">mysqlnd</a>. </p> <p class="para"> As of version PHP 5.3.3 the MySQL native driver for PHP ( <em>mysqlnd</em>) features an internal plugin C API. C plugins, such as the query cache plugin, can extend the functionality of <a href="book.mysqlnd.html" class="link">mysqlnd</a>. </p> <p class="para"> Mysqlnd plugins such as the query cache plugin operate transparent from a user perspective. The cache plugin supports all PHP applications and all PHP MySQL extensions ( <a href="ref.mysqli.html" class="link">mysqli</a>, <a href="ref.mysql.html" class="link">mysql</a>, <a href="ref.pdo-mysql.html" class="link">PDO_MYSQL</a>). It does not change existing APIs. </p> <p class="para"> No significant application changes are required to cache a query. The cache has two operation modes. It will either cache all queries (not recommended) or only those queries marked with a certain SQL hint (recommended). </p> <div class="section" id="mysqlnd-qc.key-features"> <h2 class="title">Key Features</h2> <p class="para"> <ul class="itemizedlist"> <li class="listitem"> <p class="para"> Transparent and therefore easy to use </p> <p class="para"> <ul class="itemizedlist"> <li class="listitem"> <p class="para"> supports all PHP MySQL extensions </p> </li> <li class="listitem"> <p class="para"> no API changes </p> </li> <li class="listitem"> <p class="para"> very little application changes required </p> </li> </ul> </p> </li> <li class="listitem"> <p class="para"> Flexible invalidation strategy </p> <p class="para"> <ul class="itemizedlist"> <li class="listitem"> <p class="para"> Time-to-Live (TTL) </p> </li> <li class="listitem"> <p class="para"> user-defined </p> </li> </ul> </p> </li> <li class="listitem"> <p class="para"> Storage with different scope and life-span </p> <p class="para"> <ul class="itemizedlist"> <li class="listitem"> <p class="para"> Default (Hash, process memory) </p> </li> <li class="listitem"> <p class="para"> <a href="ref.apc.html" class="link">APC</a> </p> </li> <li class="listitem"> <p class="para"> MEMCACHE </p> </li> <li class="listitem"> <p class="para"> sqlite </p> </li> <li class="listitem"> <p class="para"> user-defined </p> </li> </ul> </p> </li> <li class="listitem"> <p class="para"> Built-in slam defense to prevent cache stampeding. </p> </li> </ul> </p> </div> <div class="section" id="mysqlnd-qc.limitations"> <h2 class="title">Limitations</h2> <p class="para"> The current 1.0.1 release of PECL mysqlnd_qc does not support PHP 5.4. Version 1.1.0-alpha lifts this limitation. </p> <p class="para"> Prepared statements and unbuffered queries are fully supported. Thus, the plugin is capable of caching all statements issued with <em>mysqli</em> or <em>PDO_MySQL</em>, which are the only two PHP MySQL APIs to offer prepared statement support. </p> </div> <div class="section" id="mysqlnd-qc.name"> <h2 class="title">On the name</h2> <p class="para"> The shortcut <em>mysqlnd_qc</em> stands for <em>mysqlnd query cache plugin</em>. The name was chosen for a quick-and-dirty proof-of-concept. In the beginning the developers did not expect to continue using the code base. Sometimes PECL/mysqlnd_qc has also been called <em>client-side query result set cache</em>. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="book.mysqlnd-qc.html">mysqlnd_qc</a></div> <div class="next" style="text-align: right; float: right;"><a href="mysqlnd-qc.quickstart.html">Quickstart and Examples</a></div> <div class="up"><a href="book.mysqlnd-qc.html">mysqlnd_qc</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>