cache.h (b97fa2ef508bb1cc99621edb8b6d03845b55b8bd) cache.h (46be34b90213ebd9037cb2c24aec0009d7f2f5c1)
1/*-
2 * Copyright (c) 1992 Keith Muller.
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Keith Muller of the University of California, San Diego.
8 *

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

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)cache.h 8.1 (Berkeley) 5/31/93
1/*-
2 * Copyright (c) 1992 Keith Muller.
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Keith Muller of the University of California, San Diego.
8 *

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

30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 *
37 * @(#)cache.h 8.1 (Berkeley) 5/31/93
38 * $Id$
38 * $Id: cache.h,v 1.4 1997/02/22 14:04:22 peter Exp $
39 */
40
41/*
42 * Constants and data structures used to implement group and password file
43 * caches. Traditional passwd/group cache routines perform quite poorly with
44 * archives. The chances of hitting a valid lookup with an archive is quite a
45 * bit worse than with files already resident on the file system. These misses
39 */
40
41/*
42 * Constants and data structures used to implement group and password file
43 * caches. Traditional passwd/group cache routines perform quite poorly with
44 * archives. The chances of hitting a valid lookup with an archive is quite a
45 * bit worse than with files already resident on the file system. These misses
46 * create a MAJOR performance cost. To adress this problem, these routines
46 * create a MAJOR performance cost. To address this problem, these routines
47 * cache both hits and misses.
48 *
49 * NOTE: name lengths must be as large as those stored in ANY PROTOCOL and
50 * as stored in the passwd and group files. CACHE SIZES MUST BE PRIME
51 */
52#define UNMLEN 32 /* >= user name found in any protocol */
53#define GNMLEN 32 /* >= group name found in any protocol */
54#define UID_SZ 317 /* size of user_name/uid cache */

--- 21 unchanged lines hidden ---
47 * cache both hits and misses.
48 *
49 * NOTE: name lengths must be as large as those stored in ANY PROTOCOL and
50 * as stored in the passwd and group files. CACHE SIZES MUST BE PRIME
51 */
52#define UNMLEN 32 /* >= user name found in any protocol */
53#define GNMLEN 32 /* >= group name found in any protocol */
54#define UID_SZ 317 /* size of user_name/uid cache */

--- 21 unchanged lines hidden ---