Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
|
Public Member Functions | |
load_for_cache ($key) | |
Loads the data for the key provided ready formatted for caching. | |
load_many_for_cache (array $keys) | |
Loads several keys for the cache. | |
Static Public Member Functions | |
static | get_instance_for_cache (definition $definition) |
Returns an instance of the data source class that the cache can use for loading data using the other methods specified by this interface. | |
|
static |
Returns an instance of the data source class that the cache can use for loading data using the other methods specified by this interface.
definition | $definition |
object |
Implemented in core_course\cache\course_image, core_message\time_last_message_between_users, mod_assign\cache\overrides, mod_lesson\cache\overrides, mod_quiz\cache\overrides, mod_scorm\cache\elements, and question_finder.
core_cache\data_source_interface::load_for_cache | ( | $key | ) |
Loads the data for the key provided ready formatted for caching.
string | int | $key | The key to load. |
mixed | What ever data should be returned, or false if it can't be loaded. |
Implemented in core_course\cache\course_image, core_message\time_last_message_between_users, mod_assign\cache\overrides, mod_lesson\cache\overrides, mod_quiz\cache\overrides, mod_scorm\cache\elements, and question_finder.
core_cache\data_source_interface::load_many_for_cache | ( | array | $keys | ) |
Loads several keys for the cache.
array | $keys | An array of keys each of which will be string|int. |
array | An array of matching data items. |
Implemented in core_course\cache\course_image, core_message\time_last_message_between_users, mod_assign\cache\overrides, mod_lesson\cache\overrides, mod_quiz\cache\overrides, mod_scorm\cache\elements, and question_finder.