Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Podcast: Pre-caching - Schedule activity over an extended period
This change adapts the podcast image and 'more info' pre-caching activity to take place over an extended period of time. The intention is to avoid overly burdening modestly endowed servers. Some users may have a considerable number of subscribed feeds (in excess of 100 have been reported), and to fetch and parse this number of feeds all at the same time can cause considerable delays (reportedly in the 10s of seconds) when browsing the podcast UI. This will be particularly noticeable when using the podcast menu after clearing server caches, or re-installing LMS. In those circumstances all feeds need to be pre-cached, and this will be attempted on first use of the podcast menu. With this change, pre-caching of each feed will take place at 30 second intervals. Most feeds will only take a few seconds to handle, so that is a rather conservative interval. But some feeds may contain several hundred items, which take rather longer to parse. The 30 second interval should allow most feeds encountered to complete before starting up a new one. The aim is to gather up the data in a gentle manner. The scheduling is carried out by firing off a timer for each feed concerned, at 30 second intervals (Slim::Utils::Timers::setTimer). No explicit expiry time need be set for the retrieved feed, we will be caching the data we want from it.
- Loading branch information