my $cache = Data::Downloader::Cache::LRU->new(repository => <repository>); $cache->purge if $cache->needs_purge;
This is the base class for caching algorithms.
A Data::Downloader::Cache acts on a repository; a repository uses a particular cache algorithm. The cache algorithm is then responsible for determining which files have expired, and purging them as necessary.
Get or set the repository (a DD::Repository object)
Purge all expired files for a repository.
Does the cache for this repository need to be purged?
Find all the files which are expired, and may be purged.
Returns a list of DD::File objects.