mirror of
https://github.com/php/doc-zh.git
synced 2026-04-29 03:03:14 +02:00
82 lines
2.6 KiB
XML
82 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 87d6bb1bbd5f118f5b0cf0160438f06c0f91ea45 Maintainer: zhoumengkang Status: ready -->
|
|
<!-- CREDITS: mowangjuanzi -->
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.opcache-invalidate">
|
|
<refnamediv>
|
|
<refname>opcache_invalidate</refname>
|
|
<refpurpose>废除脚本缓存</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>opcache_invalidate</methodname>
|
|
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
|
<methodparam choice="opt"><type>bool</type><parameter>force</parameter><initializer>&false;</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
该函数的作用是使得指定脚本的字节码缓存失效。如果 <parameter>force</parameter> 没有设置或者传入的是
|
|
&false;,那么只有当脚本的修改时间比对应字节码的时间更新,脚本的缓存才会失效。此函数仅使内存缓存无效,而不是文件缓存。
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>filename</parameter></term>
|
|
<listitem>
|
|
<simpara>
|
|
缓存需要被作废对应的脚本路径
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>force</parameter></term>
|
|
<listitem>
|
|
<simpara>
|
|
如果该参数设置为&true;,那么不管是否必要,该脚本的缓存都将被废除。
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<simpara>
|
|
如果 <parameter>filename</parameter> 的字节码缓存失效设置成功或者该脚本本来就没有缓存,则返回
|
|
&true;;如果字节码缓存被禁用,则返回&false;。
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<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
|
|
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
|
|
-->
|