<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.wincache.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.wincache-ucache-info.php',
    1 => 'wincache_ucache_info',
    2 => 'Retrieves information about data stored in the user cache',
  ),
  'up' => 
  array (
    0 => 'ref.wincache.php',
    1 => 'WinCache Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.wincache-ucache-inc.php',
    1 => 'wincache_ucache_inc',
  ),
  'next' => 
  array (
    0 => 'function.wincache-ucache-meminfo.php',
    1 => 'wincache_ucache_meminfo',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/wincache/functions/wincache-ucache-info.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.wincache-ucache-info" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">wincache_ucache_info</h1>
  <p class="verinfo">(PECL wincache &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">wincache_ucache_info</span> &mdash; <span class="dc-title">
   Retrieves information about data stored in the user cache
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.wincache-ucache-info-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>wincache_ucache_info</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$summaryonly</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></span></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$key</code><span class="initializer"> = NULL</span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Retrieves information about data stored in the user cache.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.wincache-ucache-info-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">summaryonly</code></dt>
     <dd>
      <p class="para">
       Controls whether the returned array will contain information about individual cache entries 
       along with the user cache summary.
      </p>
     </dd>
    
    
     <dt><code class="parameter">key</code></dt>
     <dd>
      <p class="para">
       The key of an entry in the user cache. If specified then the returned array will contain information 
       only about that cache entry. If not specified and <code class="parameter">summaryonly</code> is set to 
       <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> then the returned array will contain information about all entries in the cache.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.wincache-ucache-info-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Array of meta data about user cache  o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento
  </p>
    <p class="para">
   The array returned by this function contains the following elements:
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      <code class="literal">total_cache_uptime</code> - total time in seconds that the user cache has been active
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <code class="literal">total_item_count</code> - total number of elements that are currently in the user cache
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <code class="literal">is_local_cache</code> - true is the cache metadata is for a local cache instance, 
       false if the metadata is for the global cache
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <code class="literal">total_hit_count</code> - number of times the data has been served from the cache
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      <code class="literal">total_miss_count</code> - number of times the data has not been found in the cache
     </span>
    </li>
    <li class="listitem">
     <p class="para">
      <code class="literal">ucache_entries</code> - an array that contains the information about all the cached items:
      <ul class="itemizedlist">
       <li class="listitem">
        <span class="simpara">
         <code class="literal">key_name</code> - name of the key which is used to store the data
        </span>
       </li>
       <li class="listitem">
        <span class="simpara">
         <code class="literal">value_type</code> - type of value stored by the key
        </span>
       </li>
       <li class="listitem">
        <span class="simpara">
         <code class="literal">use_time</code> - time in seconds since the file has been accessed in the opcode cache
        </span>
       </li>
       <li class="listitem">
        <span class="simpara">
         <code class="literal">last_check</code> - time in seconds since the file has been checked for modifications
        </span>
       </li>
       <li class="listitem">
        <span class="simpara">
         <code class="literal">is_session</code> - indicates if the data is a session variable
        </span>
       </li>
       <li class="listitem">
        <span class="simpara">
         <code class="literal">ttl_seconds</code> - time remaining for the data to live in the cache, 0 meaning infinite
        </span>
       </li>
       <li class="listitem">
        <span class="simpara">
         <code class="literal">age_seconds</code> - time elapsed from the time data has been added in the cache
        </span>
       </li>
       <li class="listitem">
        <span class="simpara">
         <code class="literal">hitcount</code> - number of times data has been served from the cache
        </span>
       </li>
      </ul>
     </p>
    </li>
   </ul>
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.wincache-ucache-info-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 Using <span class="function"><strong>wincache_ucache_info()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />wincache_ucache_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'green'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">wincache_ucache_set</span><span style="color: #007700">(</span><span style="color: #DD0000">'green'</span><span style="color: #007700">, </span><span style="color: #0000BB">2922</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">wincache_ucache_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'green'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">wincache_ucache_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'green'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">wincache_ucache_get</span><span style="color: #007700">(</span><span style="color: #DD0000">'green'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">wincache_ucache_info</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Il precedente esempio visualizzerà:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array 
( [&quot;total_cache_uptime&quot;] =&gt; int(0)
  [&quot;is_local_cache&quot;] =&gt; bool(false)
  [&quot;total_item_count&quot;] =&gt; int(1) 
  [&quot;total_hit_count&quot;] =&gt; int(3) 
  [&quot;total_miss_count&quot;] =&gt; int(1) 
  [&quot;ucache_entries&quot;] =&gt; Array(1) 
    ( [1] =&gt; Array(6)
      ( 
        [&quot;key_name&quot;] =&gt; string(5) &quot;green&quot;
        [&quot;value_type&quot;] =&gt; string(4) &quot;long&quot; 
        [&quot;is_session&quot;] =&gt; int(0) 
        [&quot;ttl_seconds&quot;] =&gt; int(0)
        [&quot;age_seconds&quot;] =&gt; int(0)
        [&quot;hitcount&quot;] =&gt; int(3) 
       ) 
    ) 
)</pre>
</div>
    </div>    
   </div>
  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.wincache-ucache-info-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.wincache-fcache-meminfo.php" class="function" rel="rdfs-seeAlso">wincache_fcache_meminfo()</a> - Retrieves information about file cache memory usage</span></li>
    <li><span class="function"><a href="function.wincache-ocache-fileinfo.php" class="function" rel="rdfs-seeAlso">wincache_ocache_fileinfo()</a> - Retrieves information about files cached in the opcode cache</span></li>
    <li><span class="function"><a href="function.wincache-ocache-meminfo.php" class="function" rel="rdfs-seeAlso">wincache_ocache_meminfo()</a> - Retrieves information about opcode cache memory usage</span></li>
    <li><span class="function"><a href="function.wincache-rplist-meminfo.php" class="function" rel="rdfs-seeAlso">wincache_rplist_meminfo()</a> - Retrieves information about memory usage by the resolve file path cache</span></li>
    <li><span class="function"><a href="function.wincache-rplist-fileinfo.php" class="function" rel="rdfs-seeAlso">wincache_rplist_fileinfo()</a> - Retrieves information about resolve file path cache</span></li>
    <li><span class="function"><a href="function.wincache-refresh-if-changed.php" class="function" rel="rdfs-seeAlso">wincache_refresh_if_changed()</a> - Refreshes the cache entries for the cached files</span></li>
    <li><span class="function"><a href="function.wincache-ucache-meminfo.php" class="function" rel="rdfs-seeAlso">wincache_ucache_meminfo()</a> - Retrieves information about user cache memory usage</span></li>
    <li><span class="function"><a href="function.wincache-scache-info.php" class="function" rel="rdfs-seeAlso">wincache_scache_info()</a> - Retrieves information about files cached in the session cache</span></li>
    <li><span class="function"><a href="function.wincache-scache-meminfo.php" class="function" rel="rdfs-seeAlso">wincache_scache_meminfo()</a> - Retrieves information about session cache memory usage</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>