-
Notifications
You must be signed in to change notification settings - Fork 105
/
opcache-invalidate.xml
83 lines (79 loc) · 2.6 KB
/
opcache-invalidate.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 50b104c116f6b1798e36bf2f56b1fa023b8a7a92 Maintainer: zhoumengkang Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.opcache-invalidate" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<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>
<para>
该函数的作用是使得指定脚本的字节码缓存失效。如果 <parameter>force</parameter> 没有设置或者传入的是
&false;,那么只有当脚本的修改时间比对应字节码的时间更新,脚本的缓存才会失效。此函数仅使内存缓存无效,而不是文件缓存。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>filename</parameter></term>
<listitem>
<para>
缓存需要被作废对应的脚本路径
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>force</parameter></term>
<listitem>
<para>
如果该参数设置为&true;,那么不管是否必要,该脚本的缓存都将被废除。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
如果 <parameter>filename</parameter> 的字节码缓存失效设置成功或者该脚本本来就没有缓存,则返回
&true;;如果字节码缓存被禁用,则返回&false;。
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>opcache_compile_file</function></member>
<member><function>opcache_reset</function></member>
</simplelist>
</para>
</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
-->