Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
This class is used by cURL class, use case: More...
Public Member Functions | |
stdClass | __construct ($module='repository') |
Constructor. More... | |
cleanup ($expire) | |
Remove cache files. More... | |
stdClass | get ($param) |
Get cached value. More... | |
object | refresh () |
delete current user's cache file More... | |
object | set ($param, $val) |
Set cache value. More... | |
Public Attributes | |
string | $dir = '' |
Path to cache directory. | |
This class is used by cURL class, use case:
$CFG->repositorycacheexpire = 120; $CFG->curlcache = 120;
$c = new curl(array('cache'=>true), 'module_cache'=>'repository'); $ret = $c->get('http://www.google.com');
stdClass curl_cache::__construct | ( | $module = 'repository' | ) |
curl_cache::cleanup | ( | $expire | ) |
Remove cache files.
int | $expire | The number of seconds before expiry |
stdClass curl_cache::get | ( | $param | ) |
Get cached value.
$CFG @global stdClass $USER
mixed | $param |
bool|string |
object curl_cache::refresh | ( | ) |
delete current user's cache file
$CFG @global object $USER
object curl_cache::set | ( | $param, | |
$val | |||
) |
Set cache value.
$CFG @global object $USER
mixed | $param | |
mixed | $val |