WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #14759, comment 18


Ignore:
Timestamp:
03/14/2013 12:40:19 AM (6 years ago)
Author:
Viper007Bond
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14759, comment 18

    initial v1  
    11Transients unfortunately probably aren't a viable solution. The problem is that if you have a persistent object cache enabled, transients are never written to the database, only to memcached or whatever system you have set up. These caches come and go and will almost certainly not last 30 days (likely much, much less). This would result in more frequent cache fetching. This is why I chose post meta in the first place -- it is persistent.
    22
    3 There's also the issue of race conditions. If a cache expires and your site is very popular, you will easily have hundreds of users triggering the cache repopulation before it is completed. This is why caching is dome preemptively right now via an AJAX request (after you come back to the edit page after saving).
     3There's also the issue of race conditions. If a cache expires and your site is very popular, you will easily have hundreds of users triggering the cache repopulation before it is completed. This is why caching is done preemptively right now via an AJAX request (after you come back to the edit page after saving). It's only done on-demand via the frontend if that AJAX request somehow fails (or potentially in a race condition).
    44
    55Asynchronous cache repopulation is probably the solution here, i.e. WP-Cron. It could loop through the post meta entries and regenerate any that have expired.