CaRP Evolution Box
Web This Site

CaRP: Caching RSS Parser - Documentation


CaRP Interactive FAQ
Getting Started: Free Download | Purchase | Install
Reference: Functions | Plugins | Themes | Full Index
Etc.: Display Formatting | Example Code | Affiliates

CarpClearCache( which [, stale] );

Delete all of the files in one of the cache directories
EvolutionLEKoiSE
>=3.5All>=3.5>=3.5
Description:
This function deletes all of the files in the cache folder indicated by "which".

Arguments:
  1. which: indicates by number which cache folder to empty. Valid values are:
    • 0: CarpAggregatePath--the aggregation cache
    • 1: CarpCachePath--where formatted output is stored by CarpAggregate, CarpFilter, CarpCacheFilter, CarpShow and CarpCacheShow
    • 2: CarpAutoCachePath--where raw newsfeeds are stored by CarpCacheFilter and CarpCacheShow
  2. stale: Optionally, you may indicate how many days old each file must be to be deleted. If this argument is ommitted or is 0 (zero), all cache files in the specified directory will be deleted.

Return value: none

Usage Example (delete all files from the "autocache" directory that are more than 7 days old):
<?php
require_once '/home/geckotribe/carp/carp.php';
CarpClearCache(2,7);
?>