Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
core_cache\ttl_wrapper Class Reference

Public Member Functions

 __construct ($data, $ttl)
 Constructs a ttl cache wrapper.
 
 has_expired ()
 Returns true if the data has expired.
 

Public Attributes

mixed $data
 The data being stored.
 
int $expires
 When the cache data expires as a timestamp.
 

Detailed Description

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_cache\ttl_wrapper::__construct ( $data,
$ttl )

Constructs a ttl cache wrapper.

Parameters
mixed$data
int$ttlThe time to live in seconds.

Member Function Documentation

◆ has_expired()

core_cache\ttl_wrapper::has_expired ( )

Returns true if the data has expired.

Return values
int

The documentation for this class was generated from the following file: