<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.basic.php.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'book.apcu.php',
    1 => 'APCu',
    2 => 'APC User Cache',
  ),
  'up' => 
  array (
    0 => 'refs.basic.php.php',
    1 => 'Affecting PHP\'s Behaviour',
  ),
  'prev' => 
  array (
    0 => 'refs.basic.php.php',
    1 => 'Affecting PHP\'s Behaviour',
  ),
  'next' => 
  array (
    0 => 'apcu.setup.php',
    1 => 'Installing/Configuring',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/apcu/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.apcu.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.apcu" class="book">
 
 <h1 class="title">APC User Cache</h1>
 

 <div id="intro.apcu" class="preface">
  <h1 class="title">Introduction</h1>
  <p class="simpara">
   APCu is an in-memory key-value store for PHP.
   Keys are of type <span class="type"><a href="language.types.string.php" class="type string">string</a></span> and values can be any PHP variables.
   APCu only supports userland caching of variables.
  </p>
  <p class="simpara">
   The APCu cache is per-process on Windows, so when using a process-based
   (rather than thread-based) SAPI, it will not be shared between different processes.
  </p>
  <p class="simpara">
   APCu is APC stripped of opcode caching.
  </p>
  <p class="simpara">
   The first APCu codebase was versioned 4.0.0, it was forked from the head of the APC master branch at the time.
   PHP 7 support is available as of APCu 5.0.0. PHP 8 support is available as of APCu 5.1.19.
  </p>
 </div>

 




 


 







 





<ul class="chunklist chunklist_book"><li><a href="apcu.setup.php">Installing/Configuring</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="apcu.installation.php">Installation</a></li><li><a href="apcu.configuration.php">Runtime Configuration</a></li></ul></li><li><a href="apcu.constants.php">Predefined Constants</a></li><li><a href="ref.apcu.php">APCu Functions</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.apcu-add.php">apcu_add</a> — Cache a new variable in the data store</li><li><a href="function.apcu-cache-info.php">apcu_cache_info</a> — Retrieves cached information from APCu's data store</li><li><a href="function.apcu-cas.php">apcu_cas</a> — Updates an old value with a new value</li><li><a href="function.apcu-clear-cache.php">apcu_clear_cache</a> — Clears the APCu cache</li><li><a href="function.apcu-dec.php">apcu_dec</a> — Decrease a stored number</li><li><a href="function.apcu-delete.php">apcu_delete</a> — Removes a stored variable from the cache</li><li><a href="function.apcu-enabled.php">apcu_enabled</a> — Whether APCu is usable in the current environment</li><li><a href="function.apcu-entry.php">apcu_entry</a> — Atomically fetch or generate a cache entry</li><li><a href="function.apcu-exists.php">apcu_exists</a> — Checks if entry exists</li><li><a href="function.apcu-fetch.php">apcu_fetch</a> — Fetch a stored variable from the cache</li><li><a href="function.apcu-inc.php">apcu_inc</a> — Increase a stored number</li><li><a href="function.apcu-key-info.php">apcu_key_info</a> — Get detailed information about the cache key</li><li><a href="function.apcu-sma-info.php">apcu_sma_info</a> — Retrieves APCu Shared Memory Allocation information</li><li><a href="function.apcu-store.php">apcu_store</a> — Cache a variable in the data store</li></ul></li><li><a href="class.apcuiterator.php">APCUIterator</a> — The APCUIterator class<ul class="chunklist chunklist_book chunklist_children"><li><a href="apcuiterator.construct.php">APCUIterator::__construct</a> — Constructs an APCUIterator iterator object</li><li><a href="apcuiterator.current.php">APCUIterator::current</a> — Get current item</li><li><a href="apcuiterator.gettotalcount.php">APCUIterator::getTotalCount</a> — Get total count</li><li><a href="apcuiterator.gettotalhits.php">APCUIterator::getTotalHits</a> — Get total cache hits</li><li><a href="apcuiterator.gettotalsize.php">APCUIterator::getTotalSize</a> — Get total cache size</li><li><a href="apcuiterator.key.php">APCUIterator::key</a> — Get iterator key</li><li><a href="apcuiterator.next.php">APCUIterator::next</a> — Move pointer to next item</li><li><a href="apcuiterator.rewind.php">APCUIterator::rewind</a> — Rewinds iterator</li><li><a href="apcuiterator.valid.php">APCUIterator::valid</a> — Checks if current position is valid</li></ul></li></ul></div><?php manual_footer($setup); ?>