Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dwww-cache(8) [debian man page]

DWWW-CACHE(8)							      Debian							     DWWW-CACHE(8)

NAME
dwww-cache - manage the dwww cache of converted documents SYNOPSIS
dwww-cache --lookup type location dwww-cache --store type location dwww-cache --list type location dwww-cache --list-all dwww-cache --clean DESCRIPTION
dwww-cache manages the cache of converted documents; it is part of dwww(7). 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 dwww-convert(8) for more information about the arguments.) The operations are: --lookup If the document is in the cache, output it to the standard output. Otherwise, output nothing and return a non-zero status. --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 ver- sion already in the cache, remove it. --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). --list-all Like --list, but for all documents. --clean Forget all cached documents that have been deleted. 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. To stop the cache from growing too large, an entry in root's 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: find /var/cache/dwww -atime +10 | xargs rm -f dwww-cache --clean 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 dwww-cache to keep the program simple, and to allow maximum flexibility. The default dwww installation creates a /etc/cron.daily/dwww, which automatically cleans the cache each day. FILES
/var/cache/dwww/db The cache directory. /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 dwww-cache. SEE ALSO
dwww(7), dwww-convert(8). AUTHOR
Lars Wirzenius <liw@iki.fi>. Modified by Robert Luberda <robert@debian.org>. See dwww(7) for copyrights and stuff. dwww 1.11.1 February 15th, 2009 DWWW-CACHE(8)

Check Out this Related Man Page

PPI::Cache(3)						User Contributed Perl Documentation					     PPI::Cache(3)

NAME
PPI::Cache - The PPI Document Caching Layer SYNOPSIS
# Set the cache use PPI::Cache path => '/var/cache/ppi-cache'; # Manually create a cache my $Cache = PPI::Cache->new( path => '/var/cache/perl/class-PPI', readonly => 1, ); DESCRIPTION
"PPI::Cache" provides the default caching functionality for PPI. It integrates automatically with PPI itself. Once enabled, any attempt to load a document from the filesystem will be cached via cache. Please note that creating a PPI::Document from raw source or something other object will not be cached. Using PPI::Cache The most common way of using "PPI::Cache" is to provide parameters to the "use" statement at the beginning of your program. # Load the class but do not set a cache use PPI::Cache; # Use a fairly normal cache location use PPI::Cache path => '/var/cache/ppi-cache'; Any of the arguments that can be provided to the "new" constructor can also be provided to "use". METHODS
new param => $value, ... The "new" constructor creates a new standalone cache object. It takes a number of parameters to control the cache. path The "path" param sets the base directory for the cache. It must already exist, and must be writable. readonly The "readonly" param is a true/false flag that allows the use of an existing cache by a less-privileged user (such as the web user). Existing documents will be retrieved from the cache, but new documents will not be written to it. Returns a new "PPI::Cache" object, or dies on error. path The "path" accessor returns the path on the local filesystem that is the root of the cache. readonly The "readonly" accessor returns true if documents should not be written to the cache. get_document $md5sum | $source The "get_document" method checks to see if a Document is stored in the cache and retrieves it if so. store_document $Document The "store_document" method takes a PPI::Document as argument and explicitly adds it to the cache. Returns true if saved, or "undef" (or dies) on error. FIXME (make this return either one or the other, not both) TO DO
- Finish the basic functionality - Add support for use PPI::Cache auto-setting $PPI::Document::CACHE SUPPORT
See the support section in the main module. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2005 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.18.2 2011-02-25 PPI::Cache(3)
Man Page