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
|
.\" $Id: dwww-cache.8,v 1.13 2005-03-08 20:06:40 robert Exp $
.\"
.TH DWWW\-CACHE 8 "March 8th, 2005" "dwww 1.9.17" "Debian"
.SH NAME
dwww\-cache \- manage the dwww cache of converted documents
.SH SYNOPSIS
.BI "dwww\-cache \-\-lookup " "type location"
.br
.BI "dwww\-cache \-\-store " "type location"
.br
.BI "dwww\-cache \-\-list " "type location"
.br
.BI "dwww\-cache \-\-list\-all"
.br
.BI "dwww\-cache \-\-clean"
.SH "DESCRIPTION"
.B dwww\-cache
manages the cache of converted documents; it is part of
.BR dwww (8).
An option (the first argument) specifies the operation.
Some operations operate on the whole cache, and need no other arguments.
Others need the second and third argument to specify the type and
pathname of the original document.
(See
.BR dwww\-convert (8)
for more information about the arguments.)
.PP
The operations are:
.TP
.B \-\-lookup
If the document is in the cache, output it to the standard output.
Otherwise, output nothing and return a non-zero status.
.TP
.B \-\-store
Read the document from the standard input, output it to the standard output
and store it into the cache.
If there was an older version already in the cache, remove it.
.TP
.B \-\-list
Output information about one document in the cache to the standard output.
The information is one line, with four space delimited fields:
type, pathname of original, pathname of cached, and permanent flag (y or n).
.TP
.B \-\-list\-all
Like
.BR \-\-list ,
but for all documents.
.TP
.B \-\-clean
Forget all cached documents that have been deleted.
.PP
.B dwww\-cache
maintains a database with information of the cached documents.
The documents themselves are stored in separate files in the cache
directory.
When old documents are removed from the cache by a suitable crontab
entry, they will still exist in the database.
This operation removes all entries from the database where either the
original or the converted file is now missing.
.PP
To stop the cache from growing too large, an entry in root's
.B crontab
should remove cached files that have not been accessed for a while.
For example, the following commands remove all documents that have not
been accessed for ten days:
.PP
.RS
find /var/cache/dwww \-atime +10 | xargs rm \-f
.br
dwww\-cache \-\-clean
.RE
.PP
The idea is to first delete the old cached files and then clean up
the database.
The policy of cleaning the cache has been kept outside of
.B dwww\-cache
to keep the program simple, and to allow maximum flexibility.
The default
.B dwww
installation creates a
.IR /etc/cron.daily/dwww ,
which automatically cleans the cache each day.
.SH FILES
.TP
.I /var/cache/dwww/db
The cache directory.
.TP
.I /var/cache/dwww/db/.cache_db
The database with information about all cached documents.
This is a binary file, specially encoded for small size and
high speed, and should not be touched by anyone but
.BR dwww\-cache .
.SH "SEE ALSO"
.BR dwww (8),
.BR dwww\-convert (8).
.SH AUTHOR
Lars Wirzenius <liw@iki.fi>.
Modified by Robert Luberda <robert@debian.org>.
.br
See
.BR dwww (8)
for copyrights and stuff.
|