summaryrefslogtreecommitdiffstats
path: root/docs/manual/mod/mod_file_cache.xml.ko
blob: 318f54698168bda45c7594f328db04a39b77a336 (plain)
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<?xml version="1.0" encoding="EUC-KR"?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
<!-- English Revision: 1.7 -->

<!--
 Copyright 2004 The Apache Software Foundation

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<modulesynopsis metafile="mod_file_cache.xml.meta">

<name>mod_file_cache</name>
<description>�޸𸮿� ���� ���ϵ��� ij��</description>
<status>Experimental</status>
<sourcefile>mod_file_cache.c</sourcefile>
<identifier>file_cache_module</identifier>

<summary>

    <note type="warning">
      �� ����� �����ؼ� ����ؾ� �Ѵ�. <module>mod_file_cache</module>��
����Ͽ� ����Ʈ�� ��ġ�� ����Ƿ� �� ������ �IJ��� �о��.
    </note>

    <p>���� ������ �ʰ� ���� ��û�Ǵ� ������ <em>ij��</em>�� �����Ͽ�
���� ���ϸ� ���� �� �ִ�. <module>mod_file_cache</module>��
�ΰ��� ������� ���� ��û�Ǵ� <em>����</em> ������ ij���� �����Ѵ�.
���� ���þ ���� <module>mod_file_cache</module>�� ������
����(open) <code>mmap()</code>���� ������ �̸� ����
<em>���� �ڵ鷯</em>�� �������� �����Ѵ�. �� ��� ���
������ �����ϱ����� �۾��� �Ϻθ� ((Ư�� ���� �����) ���� ��û������
�ϴ� ��� ������ �����Ҷ� �Ͽ� ���� ���ϸ� �����Ѵ�.</p>

    <p>����: �� ����� CGI ���α׷��̳� Ư���� �����ڵ鷯�� ���� �����ϴ�
������ �ӵ��� ����� �� ����. �� ����� ���� ����ġ core �����ڵ鷯��
�����ϴ� �Ϲ����Ͽ��� ����ȴ�.</p>

    <p>�� ����� ����ġ 1.3�� <code>mod_mmap_static</code> �����
������ ���� ���� Ȯ���̴�.</p>
</summary>

<section id="using"><title>mod_file_cache ����ϱ�</title>

    <p><module>mod_file_cache</module>�� �ּ��� ��������
<directive module="mod_file_cache"
    >MMapFile</directive>�� <directive module="mod_file_cache"
    >CacheFile</directive> ���þ ���� ������ ���� ���ϵ���
ij���� �����Ѵ�.</p>

    <p>��� �÷����� �� ���þ ��� �����ϴ� ���� �ƴϴ�.
���� ���, ��������� ����ġ�� ���� <directive
    module="mod_file_cache">MMapStatic</directive> ���þ
�������� ������, AIX ���� �ٸ� �÷����� �� ��� �����Ѵ�.
���������ʴ� ���þ ����� ��� ���� ���� �α׿� ��������
�����. ���������ʴ� ���þ ����ص� ������ ����������
������ ij���� �������� �ʴ´�. �� ���þ ��� �����ϴ� �÷�����
����Ѵٸ� � ����� �� ������ �����غ� �� �ִ�.</p>

    <section><title>MMapFile ���þ�</title>

      <p><module>mod_file_cache</module>��
<directive module="mod_file_cache">MMapFile</directive> ���þ��
������ ������ ���ϵ��� <code>mmap()</code> �ý���ȣ���� ����Ͽ�
�޸𸮿� �����Ѵ�. ���� �ֱ� ���н��� �ü���� �� �ý���ȣ����
������, ���� �ü���� �ִ�. ��, <code>mmap()</code>�� �� �ִ�
���� ũ��� ������ �ý����� ������ �� �����Ƿ� �����غ��� ����
����.</p>

      <p>������ �����Ҷ��� ������Ҷ��� <code>mmap()</code>��
�Ѵ�. �׷��� ���Ͻý��ۿ��� �ش� ������ �ϳ��� ����� ���
������ �����<em>�ؾ�</em> �Ѵ� (<a
      href="../stopping.html">Stopping and Restarting</a> ���� ����).
�ٽ� �����ϸ�: ������ ����������ʰ� ������ �����ϸ�
��û ���񽺰� ������ �̻��� �� �ִ�. ���� ������ �����(unlink)
���� ������ ���� ������ �����ؾ� �Ѵ�. <code>rdist</code>��
<code>mv</code>�� ���� ���� ������ �̷� ������ �����Ѵ�.
�Ź� �߰��� ���ʿ��� <code>stat()</code> �˻簡 �ʿ��ϰ�
����� ������ �ǵ��� ���ϹǷ� �� ����� ���� ��ȭ�� �Ű澲���ʴ´�.</p>
    </section>

    <section><title>CacheFile ���þ�</title>

      <p><module>mod_file_cache</module>��
<directive module="mod_file_cache">CacheFile</directive> ���þ��
���� ���þ ������
����(�� ���ϵ�)�� <em>�ڵ�(handle)</em> Ȥ��
<em>���� �����(file descriptor)</em>�� ����(open) ij���� �����Ѵ�.
������ ��û�ϸ� ������ ij������ �ڵ��� ã�Ƽ� ���� API
<code>sendfile()</code>�� (����������� <code>TransmitFile()</code>)
�ѱ��.</p>

      <!-- XXX
      <p>Insert more details about sendfile API...</p>
      -->

      <p>������ �����Ҷ��� ������Ҷ��� �̷� �����ڵ� ij����
�����. ...
This file handle caching is done once at server start or
      restart, only. So whenever one of the cached files changes on
      the filesystem you <em>have</em> to restart the server (see the
      <a href="../stopping.html">Stopping and Restarting</a>
      documentation). To reiterate that point: if the files are
      modified <em>in place</em> without restarting the server you
      may end up serving requests that are completely bogus. You
      should update files by unlinking the old copy and putting a new
      copy in place. Most tools such as <code>rdist</code> and
      <code>mv</code> do this.</p>
    </section>

    <note><title>����</title>
      <p>���丮�� ��� ������ ��������� ij���� �����ϴ�
���þ �䱸���� ����. ��� �̷��� �غ���...
<directive module="core">Include</directive> ���þ �����ϰ�
������ ���� ������ �����϶�:</p>

      <example>
        find /www/htdocs -type f -print \<br />
        | sed -e 's/.*/mmapfile &amp;/' &gt; /www/conf/mmap.conf
      </example>
    </note>
</section>

<directivesynopsis>
<name>MMapFile</name>
<description>Map a list of files into memory at startup time</description>
<syntax>MMapFile <var>file-path</var> [<var>file-path</var>] ...</syntax>
<contextlist><context>server config</context></contextlist>

<usage>
    <p>The <directive>MMapFile</directive> directive maps one or more files
    (given as whitespace separated arguments) into memory at server
    startup time. They are automatically unmapped on a server
    shutdown. When the files have changed on the filesystem at
    least a <code>HUP</code> or <code>USR1</code> signal should be send to
    the server to re-<code>mmap()</code> them.</p>

    <p>Be careful with the <var>file-path</var> arguments: They have
    to literally match the filesystem path Apache's URL-to-filename
    translation handlers create. We cannot compare inodes or other
    stuff to match paths through symbolic links <em>etc.</em>
    because that again would cost extra <code>stat()</code> system
    calls which is not acceptable. This module may or may not work
    with filenames rewritten by <module>mod_alias</module> or
    <module>mod_rewrite</module>.</p>

    <example><title>Example</title>
      MMapFile /usr/local/apache/htdocs/index.html
    </example>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CacheFile</name>
<description>Cache a list of file handles at startup time</description>
<syntax>CacheFile <var>file-path</var> [<var>file-path</var>] ...</syntax>
<contextlist><context>server config</context></contextlist>

<usage>
    <p>The <directive>CacheFile</directive> directive opens handles to
    one or more files (given as whitespace separated arguments) and
    places these handles into the cache at server startup
    time. Handles to cached files are automatically closed on a server
    shutdown.  When the files have changed on the filesystem, the
    server should be restarted to to re-cache them.</p>

    <p>Be careful with the <var>file-path</var> arguments: They have
    to literally match the filesystem path Apache's URL-to-filename
    translation handlers create. We cannot compare inodes or other
    stuff to match paths through symbolic links <em>etc.</em>
    because that again would cost extra <code>stat()</code> system
    calls which is not acceptable. This module may or may not work
    with filenames rewritten by <module>mod_alias</module> or
    <module>mod_rewrite</module>.</p>

    <example><title>Example</title>
      CacheFile /usr/local/apache/htdocs/index.html
    </example>
</usage>
</directivesynopsis>

</modulesynopsis>