⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.apc-cache-info.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Retrieves cached information from APC's data store</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.apc-add.html">apc_add</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.apc-clear-cache.html">apc_clear_cache</a></div> <div class="up"><a href="ref.apc.html">APC Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.apc-cache-info" class="refentry"> <div class="refnamediv">  <h1 class="refname">apc_cache_info</h1>  <p class="verinfo">(PECL apc:2.0-3.0.9)</p><p class="refpurpose"><span class="refname">apc_cache_info</span> &mdash; <span class="dc-title">   Retrieves cached information from APC&#039;s data store  </span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">array</span> <span class="methodname"><b><b>apc_cache_info</b></b></span>    ([ <span class="methodparam"><span class="type">string</span> <tt class="parameter">$cache_type</tt></span>   [, <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$limited</tt></span>  ]] )</div>  <p class="para rdfs-comment">   Retrieves cached information and meta-data from APC&#039;s data store.  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Array of cached data (and meta-data), or <b><tt>FALSE</tt></b> on failure  </p>  <blockquote><p><b class="note">Note</b>:    <span class="simpara">    <b>apc_cache_info()</b> will raise a warning if it is unable to    retrieve APC cache data. This typically occurs when APC is not enabled.   </span>  </p></blockquote> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">cache_type</tt></i></span>     <dd>      <p class="para">       If <i><tt class="parameter">cache_type</tt></i> is &quot;<i>user</i>&quot;,       information about the user cache will be returned.      </p>      <p class="para">        If <i><tt class="parameter">cache_type</tt></i> is &quot;<i>filehits</i>&quot;,       information about which files have been served from the bytecode cache        for the current request will be returned. This feature must be enabled at       compile time using <span class="option">--enable-filehits</span>.      </p>      <p class="para">       If an invalid or no <i><tt class="parameter">cache_type</tt></i> is specified, information about        the system cache (cached files) will be returned.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">limited</tt></i></span>     <dd>      <p class="para">       If <i><tt class="parameter">limited</tt></i> is <b><tt>TRUE</tt></b>, the       return value will exclude the individual list of cache entries.  This       is usefull when trying to optimize calls for statistics gathering.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 changelog">  <h3 class="title">ChangeLog</h3>  <p class="para">   <table class="informaltable">    <colgroup>     <thead valign="middle">      <tr valign="middle">       <th colspan="1">Version</th>       <th colspan="1">Description</th>      </tr>     </thead>     <tbody valign="middle" class="tbody">      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">3.0.11</td>       <td colspan="1" rowspan="1" align="left">        The <i><tt class="parameter">limited</tt></i> parameter was introduced.       </td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">3.0.16</td>       <td colspan="1" rowspan="1" align="left">        The &quot;<i>filehits</i>&quot; option for the        <i><tt class="parameter">cache_type</tt></i> parameter was introduced.       </td>      </tr>     </tbody>    </colgroup>   </table>  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 A <b>apc_cache_info()</b> example</b></p>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">apc_cache_info</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>    <div class="example-contents"><p>The above example will output something similar to:</p></div>    <div class="example-contents"><pre><div class="cdata"><pre>Array(    [num_slots] =&gt; 2000    [ttl] =&gt; 0    [num_hits] =&gt; 9    [num_misses] =&gt; 3    [start_time] =&gt; 1123958803    [cache_list] =&gt; Array        (            [0] =&gt; Array                (                    [filename] =&gt; /path/to/apc_test.php                    [device] =&gt; 29954                    [inode] =&gt; 1130511                    [type] =&gt; file                    [num_hits] =&gt; 1                    [mtime] =&gt; 1123960686                    [creation_time] =&gt; 1123960696                    [deletion_time] =&gt; 0                    [access_time] =&gt; 1123962864                    [ref_count] =&gt; 1                    [mem_size] =&gt; 677                )            [1] =&gt; Array (...iterates for each cached file))</pre></div>    </pre></div>   </div>  </p> </div> <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member"><a href="apc.configuration.html" class="link">APC configuration directives</a></li>   </ul>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.apc-add.html">apc_add</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.apc-clear-cache.html">apc_clear_cache</a></div> <div class="up"><a href="ref.apc.html">APC Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -