View Issue Details

IDProjectCategoryView StatusLast Update
0003959Composrcorepublic2020-02-02 23:01
ReporterChris GrahamAssigned To 
Status non-assignedResolutionopen 
Product Version 
Fixed in Version 
Summary0003959: Cache warm up via Cron
DescriptionInitial installs may seem slow because initial caches are not populated.
Additionally, future use may seem slow if some resource is accessed but the cache is expired.

These caches could easily be populated in the background (in this priority order):
 - Language file cache
 - Template cache
 - Comcode page cache
 - Blocks (by fully evaluating Comcode page URLs under different access permissions and other common cachable things like mobile vs desktop)
  - this may need more thought, as if we can somehow autodetect exactly what permutations to do, and how frequently, that would be better
 - Static cache (for anything on the Sitemap accessible to guests)
(pre-shipping compiled caches is not realistic as caches are environment-specific)
Detection of cache expiry should be biased for things expiring soon - so that we can make sure when a real user hits them that user's web request won't be responsible for doing the regeneration.

Special considerations:
 - "ignore_user_abort(true);" will need calling, so the AJAX requests keep going after the user navigates away.
 - We should use locking, only 1 background cache request at a time
  - But it needs to be smarter locking (in case of thread termination): update the lock timestamp very frequently, and ignore stale locks

This depends on 0003501 - with AJAX activated Cron it would build these caches before even proper Cron was set up. It would be low priority.
It also depends on 0003958 - we would not want to be doing extra work in Cron if we do not know it is only happening under low load. (It could be wasted effort - the cache might get emptied too soon for it to be worthwhile)
TagsType: Performance
Attach Tags
Time estimation (hours)30
Sponsorship open


related to 0003501 non-assigned Poor-mans-Cron 
related to 0003958 non-assigned Opportunistic scheduler 
related to 0002236 closedChris Graham Opportunistic scheduler and background caching 


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-11-19 01:13 Chris Graham New Issue
2019-11-19 01:13 Chris Graham Tag Attached: Type: Performance
2019-11-19 01:13 Chris Graham Relationship added related to 0002236
2019-11-19 01:14 Chris Graham Relationship added related to 0003501
2019-11-19 01:14 Chris Graham Relationship added related to 0003958
2019-11-19 01:14 Chris Graham Description Updated View Revisions