.ig Copyright (C) 1993,1994 by the author(s). This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be preserved on all copies. Author: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) $Header: af_cache.3[7.0] Mon Jul 19 18:19:37 1993 andy@cs.tu-berlin.de frozen $ .. .TH af_cache 3 "Mon Jul 19 18:19:37 1993" "AtFS-1.71" "Attribute Filesystem (AtFS)" .SH NAME af_savecache, af_cachesize \- AtFS derived object cache handling .SH SYNOPSIS #include .sp int af_savecache (Af_key *busyAso, Af_key* cachedAso, char *attr, int mode) .sp int af_cachesize (char path, int totalMax, int maxPerName, int maxPerGivenAttr); .sp .SH DESCRIPTION \fIaf_savecache\fP copies a busy attributed software object (\fIbusyAso\fP) to a derived object cache. A key for the resulting cached ASO is returned in the buffer \fIcachedAso\fP. Derived object caches are intended to hold derived objects that can be reproduced at any time. Reproducibility is important, because cached ASOs may be deleted automatically due to storage limitations for derived object caches. A cache allows a certain number of versions per name (see function af_cachesize described below) to be stored. When this number is reached, each time a new version arrives, the oldest version (access date) gets cleaned out. .LP The strategy of cleaning out old versions when space is needed for new ones is influenced by the \fIattr\fP argument. When this is given af_savecache searches for cached versions (with the same name as the new one) carrying the given attribute. If it finds one or more such versions, the oldest (access date) of them will be eliminated. .LP The \fImode\fP argument may have one of the following values .TP 3c AF_STORE_COMPLETE (default) The cached file is stored unmodified. .TP AF_STORE_COMPRESSED The cached file will be stored in a compressed format. .LP ASOs that are saved in derived object caches do not automatically get a version number. By means of \fIaf_svnum\fP (manual page af_version(3)) you can attach any version number to an ASO stored in a derived object cache. .LP \fIaf_cachesize\fP defines the size strategy of the cache in directory \fIpath\fP. It sets the maximum cache size for the whole directory (\fItotalMax\fP), the maximum number of versions per name (\fImaxPerName\fP), and the number of versions allowed simultaneously carrying the elimination attribute (see before). A value less or equal zero given for any of the arguments of af_cachesize will cause this argument to be ignored. .SH DIAGNOSTICS Upon error, \-1 is returned and \fIaf_errno\fP is set to the corresponding error number. .SH BUGS Compression of cached files (mode AF_STORE_COMPRESSED) is not yet supported. .LP af_cachesize cannot shrink derived object caches yet. Values given must be greater or equal the prevoius size.