Příspěvky uživatele Howard Miller

Moodle in English -> General developer forum -> Cache - purging for course?

autor Howard Miller -
Obrázek: Core developers Obrázek: Documentation writers Obrázek: Particularly helpful Moodlers Obrázek: Peer reviewers Obrázek: Plugin developers

As usual, I feel like I may not be asking a sensible question, but here goes anyway. 

I have a cache that I use to store some intermediate calculations. There is a keyed entry per calculation (storing a data object), and there are will be order or hundreds in each course.  If the basic data changes, I need to invalidate the cache. However, I only want to invalidate the cache entries for that course. I'm struggling to see anything in delete() or purge() that helps me with this. I can obviously prefix the keys with (say) the course ID but I can't see how that helps (no wildcard delete that I can see).

Can anybody steer me in the right direction / tell me how I'm thinking about this completely the wrong way?

Průměr hodnocení: -
Obrázek: Core developers Obrázek: Documentation writers Obrázek: Particularly helpful Moodlers Obrázek: Peer reviewers Obrázek: Plugin developers
ghostscript is not part of Moodle, so you may be asking in the wrong place. Where did it come from? Are there any bug reports related to your OS and package repositories? Have you got the latest versions of everything?
Obrázek: Core developers Obrázek: Documentation writers Obrázek: Particularly helpful Moodlers Obrázek: Peer reviewers Obrázek: Plugin developers
Yellow - settings changed from default.

Red - reached maximum retry (almost certainly not working)

Yes - you can start it manually and see what happens. But it would be even quicker to look at the logs for the task (icon to the right of the cog).
Obrázek: Core developers Obrázek: Documentation writers Obrázek: Particularly helpful Moodlers Obrázek: Peer reviewers Obrázek: Plugin developers
In which case, MOODLE_400_STABLE. But you will get the most recent version which is 4.0.12, build 2022041912

If you REALLY want to install 4.0.2 (which is build 2022041902) then you can get that from git using a 'tag'. The tagged code on github is at https://github.com/moodle/moodle/tree/v4.0.2

git clone --branch v4.0.2 https://github.com/moodle/moodle.git

...or something like that smile. --branch works with tags as well as branches (as long as they are unambiguous).