Chapter 8 Mysqlnd query result cache plugin

Table of Contents

8.1 Key Features
8.2 Limitations
8.3 On the name
8.4 Quickstart and Examples
8.4.1 Architecture and Concepts
8.4.2 Setup
8.4.3 Caching queries
8.4.4 Setting the TTL
8.4.5 Pattern based caching
8.4.6 Slam defense
8.4.7 Finding cache candidates
8.4.8 Measuring cache efficiency
8.4.9 Beyond TTL: user-defined storage
8.5 Installing/Configuring
8.5.1 Requirements
8.5.2 Installation
8.5.3 Runtime Configuration
8.6 Predefined Constants
8.7 mysqlnd_qc Functions
8.7.1 mysqlnd_qc_clear_cache
8.7.2 mysqlnd_qc_get_available_handlers
8.7.3 mysqlnd_qc_get_cache_info
8.7.4 mysqlnd_qc_get_core_stats
8.7.5 mysqlnd_qc_get_normalized_query_trace_log
8.7.6 mysqlnd_qc_get_query_trace_log
8.7.7 mysqlnd_qc_set_cache_condition
8.7.8 mysqlnd_qc_set_is_select
8.7.9 mysqlnd_qc_set_storage_handler
8.7.10 mysqlnd_qc_set_user_handlers
8.8 Change History
8.8.1 PECL/mysqlnd_qc 1.2 series
8.8.2 PECL/mysqlnd_qc 1.1 series
8.8.3 PECL/mysqlnd_qc 1.0 series

Copyright 1997-2014 the PHP Documentation Group.

The mysqlnd query result cache plugin adds easy to use client-side query caching to all PHP MySQL extensions using mysqlnd.

As of version PHP 5.3.3 the MySQL native driver for PHP ( mysqlnd) features an internal plugin C API. C plugins, such as the query cache plugin, can extend the functionality of mysqlnd.

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 ( mysqli, mysql, PDO_MYSQL). It does not change existing APIs.

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).