View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003959||Composr||core||public||2019-11-19 01:13||2020-02-02 23:01|
|Reporter||Chris Graham||Assigned To|
|Fixed in Version|
|Summary||0003959: Cache warm up via Cron|
|Description||Initial 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.
- "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)
|Time estimation (hours)||30|
|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|