Deleted Added
full compact
1.\" Copyright (c) 2005 Michael Bushkov <bushman@rsu.ru>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/usr.sbin/nscd/nscd.8 158192 2006-04-30 21:31:52Z maxim $
25.\" $FreeBSD: head/usr.sbin/nscd/nscd.8 162893 2006-09-30 19:07:03Z ru $
26.\"
27.Dd October 20, 2005
28.Dt CACHED 8
29.Os
30.Sh NAME
31.Nm cached
32.Nd "caching server daemon"
33.Sh SYNOPSIS
34.Nm
35.Op Fl nst
35.Op Fl dnst
36.Op Fl i Ar cachename
37.Op Fl I Ar cachename
38.Sh DESCRIPTION
39The
40.Nm
41utility
42is the system caching daemon.
43It can cache almost all types of data and is basically intended to be used
44with the
43.Pa nsswitch
45.Nm nsswitch
46subsystem.
47The cache is actually per-user.
48This means that each user can work only with the
49cached data that were cached by themselves, and cannot poison the
50cache of other users.
51The
52.Nm
53utility supports two types of caching:
52.Bl -tag -width Pair
54.Bl -tag -width ".Sy Type"
55.It Sy Type
56.Sy Description
57.It Common caching
56Each cached element is the the key+value pair.
58Each cached element is the key+value pair.
59This type of caching supports policies which are applied when maximum
60number of cached elements is exceeded.
61Three policies are available:
60.Pa FIFO
62.Cm FIFO
63(first in - first out),
62.Pa LRU
64.Cm LRU
65(least recently used) and
64.Pa LFU
66.Cm LFU
67(least frequently used).
68This type of caching is used with the
69.Fn getXXXbyname
70family of functions.
71.It Multipart caching
72Each cached element is the part of the elements sequence.
73This type of caching is intended to be used with the
74.Fn getXXXent
75family of functions.
76.El
77.Pp
78The
79.Nm
80utility is able not only to cache elements, but to perform the actual nsswitch
81lookups by itself.
80To enable this feature use the
81.Pa perform-actual-lookups
82parameter in the
83.Xr cached.conf 5
82To enable this feature, use the
83.Va perform-actual-lookups
84parameter in
85.Xr cached.conf 5 .
86.Pp
87The
88.Nm
89utility recognizes the following runtime options:
90.Bl -tag -width indent
91.\" .It Fl d
92.\" XXX Document me!
93.It Fl n
90Do not daemonize.
94Do not daemonize;
95.Nm
96will not fork or disconnect itself from the terminal.
97.It Fl s
98Single-threaded mode.
99Forces using only one thread for all processing purposes (it overrides
100the
97.Pa threads
101.Va threads
102parameter in the
103.Xr cached.conf 5
104file).
105.It Fl t
106Trace mode.
107All trace messages will be written to stdout.
108This mode is usually used with
109.Fl n

--- 5 unchanged lines hidden (view full) ---

115When specified,
116.Nm
117acts as the administration tool.
118It asks the already running
119.Nm
120to invalidate the specified part of the cache of the
121calling user.
122For example, sometimes you may want to invalidate your
119.Pa hosts
123.Dq Li hosts
124cache.
125You can specify
122.Pa all
126.Dq Li all
127as the
124.Pa cachename
128.Ar cachename
129to invalidate your personal cache as a whole.
126You cannot use this option for the cachename, for which
127the
128.Pa perform-actual-lookups
130You cannot use this option for the
131.Ar cachename
132for which the
133.Va perform-actual-lookups
134option is enabled.
135.It Fl I Ar cachename
136Invalidates the cache for every user.
137When specified,
138.Nm
139acts as the administration tool.
140It asks the already
141running
142.Nm
143to invalidate the specified part of the cache for
144every user.
145You can specify
141.Pa all
146.Dq Li all
147as the
143.Pa cachename
148.Ar cachename
149to invalidate the whole cache.
150Only the root can use this option.
151.El
152.Sh FILES
148.Bl -tag -width /etc/cached.conf -compact
153.Bl -tag -width ".Pa /etc/cached.conf" -compact
154.It Pa /etc/cached.conf
155The default configuration file.
156.El
157.Sh SEE ALSO
158.Xr nsdispatch 3 ,
159.Xr cached.conf 5 ,
160.Xr nsswitch.conf 5
156.Sh "AUTHORS"
161.Sh AUTHORS
162.An Michael Bushkov Aq bushman@rsu.ru
158.Sh "BUGS"
159To report bugs or suggestions please mail me:
160.Aq bushman@rsu.ru
163.Sh BUGS
164Please send bug reports and suggestions to
165.Aq bushman@rsu.ru .