Grouper - Documentation
Cache Control Settings
Use the function "GrouperConf" to set the options listed on this page.
The number of minutes before the cached file expires and the source data is refetched.
The default is 60 minutes.
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.
: [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.
GrouperConf('cachetime','8:30'); // refresh after 8:30 am, in your server's timezone
The path to the directory where your cached files will be stored.
Example: (store cache files in /home/myname/mygroupercache)
- 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.
- 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.
- Storing the cache files in the very same directory as Grouper is not recommended.
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