Hey, I'm extending $COURSE to have $COURSE->extradata
extradata has a LOT of information pulled from the database. How can I cache this information, as it will rarely change?
Don't you think that it would be worth waiting more than an hour, especially at a time of day when many of the users of this forum have gone home for the evening (or are asleep)?
As for caching data - that is up to you and it depends on how long you want to keep it for. It could go in a static variable, in the $SESSION variable, in a file, in a field / table in the database (possibly serialised & base64 encoded). The solution you come up with will depend on exactly what you are doing and how you are doing it.
I would suggest watching this ticket: http://tracker.moodle.org/browse/MDL-25290
It should allow plugins to store some data into whatever caching solution a system admin of Moodle chooses.