Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions reference/opcache/functions/opcache-compile-file.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
<type>bool</type><methodname>opcache_compile_file</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
This function compiles a PHP script and adds it to the opcode cache without
executing it. This can be used to prime the cache after a Web server
restart by pre-caching files that will be included in later requests.
</para>
</simpara>
</refsect1>

<refsect1 role="parameters">
Expand All @@ -25,39 +25,37 @@
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
<simpara>
The path to the PHP script to be compiled.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns &true; if <parameter>filename</parameter> was compiled successfully
&return.falseforfailure;.
</para>
</simpara>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<para>
<simpara>
If <parameter>filename</parameter> cannot be loaded or compiled, an error of
level <constant>E_WARNING</constant> is generated. You may use
<link linkend="language.operators.errorcontrol">@</link> to suppress this
warning.
</para>
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>opcache_invalidate</function></member>
</simplelist>
</para>
<simplelist>
<member><function>opcache_invalidate</function></member>
</simplelist>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Expand Down
14 changes: 6 additions & 8 deletions reference/opcache/functions/opcache-get-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<type class="union"><type>array</type><type>false</type></type><methodname>opcache_get_configuration</methodname>
<void/>
</methodsynopsis>
<para>
<simpara>
This function returns configuration information about the cache instance
</para>
</simpara>
</refsect1>

<refsect1 role="parameters">
Expand All @@ -24,27 +24,25 @@

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns an array of information, including ini, blacklist and version
</para>
</simpara>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<para>
<simpara>
If <literal>opcache.restrict_api</literal> is in use and the current path
is in violation of the rule, an E_WARNING will be raised; no status information will
be returned.
</para>
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>opcache_get_status</function></member>
</simplelist>
</para>
</refsect1>

</refentry>
Expand Down
24 changes: 11 additions & 13 deletions reference/opcache/functions/opcache-get-status.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<type class="union"><type>array</type><type>false</type></type><methodname>opcache_get_status</methodname>
<methodparam choice="opt"><type>bool</type><parameter>include_scripts</parameter><initializer>&true;</initializer></methodparam>
</methodsynopsis>
<para>
<simpara>
This function returns state information about the in-memory cache instance. It will not return any
information about the file cache.
</para>
</simpara>
</refsect1>

<refsect1 role="parameters">
Expand All @@ -24,29 +24,29 @@
<varlistentry>
<term><parameter>include_scripts</parameter></term>
<listitem>
<para>
<simpara>
Include script specific state information
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns an array of information, optionally containing script specific state information,
&return.falseforfailure;.
</para>
</simpara>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<para>
<simpara>
If <literal>opcache.restrict_api</literal> is in use and the current path
is in violation of the rule, an E_WARNING will be raised; no status information will
be returned.
</para>
</simpara>
</refsect1>

<refsect1 role="changelog">
Expand Down Expand Up @@ -177,11 +177,9 @@ array(9) {

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>opcache_get_configuration</function></member>
</simplelist>
</para>
<simplelist>
<member><function>opcache_get_configuration</function></member>
</simplelist>
</refsect1>

</refentry>
Expand Down
26 changes: 12 additions & 14 deletions reference/opcache/functions/opcache-invalidate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>force</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
<simpara>
This function invalidates a particular script from the opcode cache. If
<parameter>force</parameter> is unset or &false;, the script will only be
invalidated if the modification time of the script is newer than the cached
opcodes. This function only invalidates in-memory cache and not file cache.
</para>
</simpara>
</refsect1>

<refsect1 role="parameters">
Expand All @@ -27,40 +27,38 @@
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
<simpara>
The path to the script being invalidated.
</para>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>force</parameter></term>
<listitem>
<para>
<simpara>
If set to &true;, the script will be invalidated regardless of whether
invalidation is necessary.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns &true; if the opcode cache for <parameter>filename</parameter> was
invalidated or if there was nothing to invalidate, or &false; if the opcode
cache is disabled.
</para>
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>opcache_compile_file</function></member>
<member><function>opcache_reset</function></member>
</simplelist>
</para>
<simplelist>
<member><function>opcache_compile_file</function></member>
<member><function>opcache_reset</function></member>
</simplelist>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.opcache-is-script-cached-in-file-cache" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>opcache_is_script_cached_in_file_cache</refname>
<refpurpose>Tells whether a script is cached in OPCache file cache</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>opcache_is_script_cached_in_file_cache</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<simpara>
This function checks if a PHP script has been cached in OPCache. This can be
used to more easily detect the "warming" of the cache for a particular script.
This function only checks file cache cache, not in-memory cache. In order to
check in-memory cache, use <function>opcache_is_script_cached</function>.
</simpara>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<simpara>
The path to the PHP script to be checked.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
Returns &true; if <parameter>filename</parameter> is cached in OPCache,
&false; otherwise.
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>opcache_compile_file</function></member>
<member><function>opcache_is_script_cached</function></member>
</simplelist>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
28 changes: 14 additions & 14 deletions reference/opcache/functions/opcache-is-script-cached.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
<type>bool</type><methodname>opcache_is_script_cached</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
</methodsynopsis>
<para>
This function checks if a PHP script has been cached in OPCache. This can be
<simpara>
This function checks if a PHP script has been cached in OPCache in-memory cache. This can be
used to more easily detect the "warming" of the cache for a particular script.
This function only checks in-memory cache, not file cache.
</para>
This function only checks in-memory cache, not file cache. In order to
check file cache, use <function>opcache_is_script_cached_in_file_cache</function>.
</simpara>
</refsect1>

<refsect1 role="parameters">
Expand All @@ -25,29 +26,28 @@
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
<simpara>
The path to the PHP script to be checked.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &true; if <parameter>filename</parameter> is cached in OPCache,
<simpara>
Returns &true; if <parameter>filename</parameter> is cached in OPCache in-memory cache,
&false; otherwise.
</para>
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>opcache_compile_file</function></member>
</simplelist>
</para>
<simplelist>
<member><function>opcache_compile_file</function></member>
<member><function>opcache_is_script_cached_in_file_cache</function></member>
</simplelist>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Expand Down
Loading