Grouper Documentation
Grouper Documentation
twitter youtube linkedin google-plus
Grouper: RSS manager, XML converter, website scraper
Web This Site

Grouper - Documentation


Getting Started: Free Download | Purchase | Install
Reference: Functions | Plugins | Themes
Etc.: Configure | Affiliates

Cache Control Settings

Use the function "GrouperConf" to set the options listed on this page.



cacheinterval
The number of minutes before the cached file expires and the source data is refetched. The default is 60 minutes.

Example:
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperConf('cacheinterval',30);
GrouperShow('cuisine');
?>


cacheerrorwait
The number of minutes to wait before refreshing the cache if an error occurs while attempting to access the remote data. The default is 30 minutes. Note that when using the cachetime setting below, this could result in the cache not being updated for an entire day.

Example:
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperConf('cacheerrorwait',15);
GrouperShow('cuisine');
?>

cachetime: [Grouper >= 1.6] The time of day after which the cached file expires and the remote content is refetched. If this is blank (the default), cacheinterval is used instead. If this is set, cacheinterval is ignored. Specify the time as "H:M", where "H" is the hour in 24 hour format, and "M" is the minute. Be sure to specify the time in your server's time zone, which may be different from your time zone.

Example:
	require_once '/path/to/grouper.php';
	GrouperConf('cachetime','8:30'); // refresh after 8:30 am, in your server's timezone
	GrouperSearch('internet marketing','internetmarketing.rss');
	


cachepath
The path to the directory where your cached files will be stored.
Important notes:
  1. If you wish to store the cache files in the same directory as the document being loaded by the web browser, change the value of cacherelative to 0, and set cachepath to '.', not ''. If you set it to '', Grouper will attempt to use your server's root directory to hold the cache files, which will most likely fail, and isn't a good idea even if it can be done.
  2. To store the cache files in a location not relative to the location of Grouper, change the value of cacherelative to 0 and then change cachepath to the absolute (full) path to where you want to store cache files.
  3. Storing the cache files in the very same directory as Grouper is not recommended.
Example: (store cache files in /home/myname/mygroupercache)
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperConf('cacherelative',0);
GrouperConf('cachepath','/home/myname/mygroupercache');
GrouperShow('cuisine');
?>


cacherelative
This setting controls how Grouper interprets the value of the "cachepath" setting. If cacherelative is "0", then cachepath must either be an absolute path or a path relative to the location of the PHP file being loaded by the web browser. If cacherelative is "1", then cachepath is relative to the location of Grouper itsself.

Example: see above