-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclasses_Preloader.php.html
More file actions
801 lines (681 loc) · 32.6 KB
/
classes_Preloader.php.html
File metadata and controls
801 lines (681 loc) · 32.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PoweredCache Hooks: Source: classes/Preloader.php</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: classes/Preloader.php</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code><?php
/**
* Cache Preloading functionalities
*
* @package PoweredCache
*/
namespace PoweredCache;
use PoweredCache\Async\CachePreloader;
use function PoweredCache\Utils\permalink_structure_has_trailingslash;
use function PoweredCache\Utils\site_cache_dir;
use const PoweredCache\Constants\DEFERRED_PRELOAD_QUEUE_CRON_NAME;
/**
* Class Preloader
*/
class Preloader {
/**
* Plugin settings
*
* @var $settings
*/
private $settings;
/**
* Instance of CachePreloader
*
* @var CachePreloader
*/
private $cache_preloader;
/**
* Tracks whether we’ve added any URLs this request
*
* @var $queue_dirty
*/
private $queue_dirty = false;
/**
* Return an instance of the current class
*
* @return Preloader
* @since 1.0
*/
public static function factory() {
static $instance;
if ( ! $instance ) {
$instance = new self();
$instance->setup();
}
return $instance;
}
/**
* Setup routine
*/
public function setup() {
$this->settings = \PoweredCache\Utils\get_settings();
add_filter( 'wp_resource_hints', [ $this, 'dns_prefetch' ], 10, 2 );
add_filter( 'wp_resource_hints', [ $this, 'preconnect_resources' ], 10, 2 );
// bail if the preload not activated
if ( ! $this->settings['enable_cache_preload'] ) {
return;
}
$this->get_preloader();
/**
* Page cache needs to be activated to get benefits of preloading
*/
if ( ! $this->settings['enable_page_cache'] ) {
return;
}
add_action( 'admin_bar_menu', [ $this, 'admin_bar_menu' ] );
add_action( 'admin_post_powered_cache_preload_cache', [ $this, 'start_preload' ] );
add_action( 'powered_cache_purge_all_cache', [ $this, 'setup_preload_queue' ] );
add_action( 'powered_cache_clean_site_cache_dir', [ $this, 'setup_preload_queue' ] );
add_action( 'powered_cache_advanced_cache_purge_post', [ $this, 'deferred_preload_queue' ], 10, 2 );
add_action( 'powered_cache_expired_files_deleted', [ $this, 'add_expired_urls_to_preload_queue' ], 10, 2 );
add_action( DEFERRED_PRELOAD_QUEUE_CRON_NAME, [ $this, 'add_purged_urls_to_preload_queue' ], 10, 2 );
add_action( 'shutdown', [ $this, 'dispatch_preload_queue' ], 0 );
}
/**
* Preload Admin bar menu
*
* @param object $wp_admin_bar Admin bar object
*
* @since 1.0
*/
public function admin_bar_menu( $wp_admin_bar ) {
if ( POWERED_CACHE_IS_NETWORK && ! current_user_can( 'manage_network' ) ) {
return;
}
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
$wp_admin_bar->add_menu(
array(
'id' => 'preload-cache',
'title' => __( 'Preload Cache', 'powered-cache' ),
'href' => wp_nonce_url( admin_url( 'admin-post.php?action=powered_cache_preload_cache' ), 'powered_cache_preload_cache' ),
'parent' => 'powered-cache',
)
);
}
/**
* Get the instance of CachePreloader
*
* @return CachePreloader
*/
private function get_preloader() {
if ( ! $this->cache_preloader ) {
$this->cache_preloader = CachePreloader::factory();
}
return $this->cache_preloader;
}
/**
* Add preloading items to queue
*/
public function start_preload() {
$nonce = isset( $_GET['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) : '';
if ( ! wp_verify_nonce( $nonce, 'powered_cache_preload_cache' ) ) {
wp_nonce_ays( '' );
}
if ( POWERED_CACHE_IS_NETWORK && ! current_user_can( 'manage_network' ) ) {
$redirect_url = add_query_arg( 'pc_action', 'start_preload_err_permission', wp_get_referer() );
wp_safe_redirect( esc_url_raw( $redirect_url ) );
exit;
}
if ( ! current_user_can( 'manage_options' ) ) {
$redirect_url = add_query_arg( 'pc_action', 'start_preload_err_permission', wp_get_referer() );
wp_safe_redirect( esc_url_raw( $redirect_url ) );
exit;
}
\PoweredCache\Utils\log( sprintf( 'Preload triggered from admin bar.' ) );
$this->setup_preload_queue();
$redirect_url = add_query_arg( 'pc_action', 'start_preload', wp_get_referer() );
wp_safe_redirect( esc_url_raw( $redirect_url ) );
exit;
}
/**
* Setup preload
*/
public function setup_preload_queue() {
// cancel existing process before populating
$this->get_preloader()->cancel_process();
if ( POWERED_CACHE_IS_NETWORK ) {
$sites = get_sites( [ 'fields' => 'ids' ] );
foreach ( $sites as $site_id ) {
switch_to_blog( $site_id );
\PoweredCache\Utils\log( sprintf( 'Populating preload queue for site: %d', $site_id ) );
$this->populate_preload_queue();
restore_current_blog();
}
} else {
$this->populate_preload_queue();
}
if ( $this->settings['enable_sitemap_preload'] && function_exists( '\PoweredCachePremium\Utils\preload_sitemap' ) ) {
\PoweredCachePremium\Utils\preload_sitemap();
}
}
/**
* Populate preload queue based on settings
*/
protected function populate_preload_queue() {
$preload_urls = [];
if ( $this->settings['preload_homepage'] ) {
$front_page = get_option( 'page_on_front' );
if ( ! empty( $front_page ) ) {
$front_page_url = get_permalink( $front_page );
$preload_urls[] = $front_page_url;
\PoweredCache\Utils\log( sprintf( 'Front page URL added to preload queue: %s', $front_page_url ) );
}
$posts_page = get_option( 'page_for_posts' );
if ( ! empty( $posts_page ) ) {
$posts_page_url = get_permalink( $posts_page );
$preload_urls[] = $posts_page_url;
\PoweredCache\Utils\log( sprintf( 'Posts Page URL added to preload queue: %s', $posts_page_url ) );
}
/**
* trailingslashit important here,
* likely redirection is not followed for non-blocking preload request
*/
$home_url = trailingslashit( get_home_url() );
$preload_urls[] = $home_url;
\PoweredCache\Utils\log( sprintf( 'Home URL added to preload queue: %s', $home_url ) );
}
if ( $this->settings['preload_public_posts'] ) {
$public_post_urls = $this->prepare_public_posts_urls();
$preload_urls = array_merge( $preload_urls, $public_post_urls );
\PoweredCache\Utils\log( sprintf( 'Public posts added to preload queue. ' ) );
}
if ( $this->settings['preload_public_tax'] ) {
$public_tax_term_urls = $this->prepare_public_tax_terms_urls();
$preload_urls = array_merge( $preload_urls, $public_tax_term_urls );
\PoweredCache\Utils\log( sprintf( 'Public tax terms added to preload queue. ' ) );
}
/**
* Filters preload urls before sending to queue
*
* @hook populate_preload_queue_urls
*
* @param {array} $preload_urls The list of preload urls
*
* @return {array} New value.
* @since 2.4
*/
$preload_urls = apply_filters( 'populate_preload_queue_urls', $preload_urls );
foreach ( $preload_urls as $url ) {
$this->add_url_to_preload_queue( $url );
}
}
/**
* Add URLs to preload queue with a delay
*
* @param int $post_id Post ID
* @param array $urls The URL list of the related pages that will be preloaded
*
* @since 3.6
*/
public function deferred_preload_queue( $post_id, $urls ) {
\PoweredCache\Utils\log( sprintf( 'Post ID %d purged from cache, adding related URLs to preload queue with a delay.', $post_id ) );
wp_schedule_single_event(
time() + 10,
DEFERRED_PRELOAD_QUEUE_CRON_NAME,
[
'post_id' => $post_id,
'urls' => $urls,
]
);
}
/**
* Add related pages to preload queue when the cache got cleared
*
* @param int $post_id Post ID
* @param array $urls The URL list of the related pages that cleared during post update
*
* @since 2.0
*/
public function add_purged_urls_to_preload_queue( $post_id, $urls ) {
$post_url = get_permalink( $post_id );
// include post itself all the time
if ( ! empty( $post_url ) ) {
$this->add_url_to_preload_queue( $post_url );
}
if ( ! $urls ) {
return;
}
foreach ( $urls as $url ) {
$this->add_url_to_preload_queue( $url );
}
}
/**
* Requeue deleted URLs
*
* @param array $expired_files Full path of cached item
*/
public function add_expired_urls_to_preload_queue( $expired_files ) {
/**
* Filters expired urls preloading status
*
* @hook powered_cache_preload_expired_urls
*
* @param {boolean} $status True by default for preloading urls.
*
* @return {boolean} New value.
* @since 2.0
*/
$preload_expired_urls = apply_filters( 'powered_cache_preload_expired_urls', true );
if ( true !== $preload_expired_urls ) {
return;
}
/**
* Get dir path without cache file name (eg index.html)
*/
$expired_files = array_map(
function ( $item ) {
return dirname( $item );
},
$expired_files
);
$expired_files = array_unique( $expired_files ); // prevent double request due to meta.php + index.php file
// replace path with site url
$expired_urls = str_replace( site_cache_dir(), trailingslashit( get_site_url() ), $expired_files );
$has_trailingslash = permalink_structure_has_trailingslash();
foreach ( $expired_urls as $url ) {
if ( $has_trailingslash ) {
$url = trailingslashit( $url );
}
$this->add_url_to_preload_queue( $url );
}
}
/**
* Prep. public post urls for preload queue
*/
public function prepare_public_posts_urls() {
global $wpdb;
$public_posts_url = [];
/**
* Filters posts offset for preload.
*
* @hook powered_cache_preload_public_posts_offset
*
* @param {int} $offset The offset of the post query.
*
* @return {int} New value.
* @since 2.0
*/
$offset = (int) apply_filters( 'powered_cache_preload_public_posts_offset', 0 );
$max_preload_item = $this->preload_max_post_count();
\PoweredCache\Utils\log( sprintf( 'Adding public posts to queue' ) );
\PoweredCache\Utils\log( sprintf( 'OFFSET: %s', $offset ) );
\PoweredCache\Utils\log( sprintf( 'LIMIT: %s', $max_preload_item ) );
/**
* Filters public post types.
*
* @hook powered_cache_preload_post_types
*
* @param {array} $types Public post types.
*
* @return {array} New value.
* @since 1.0
*/
$types = apply_filters(
'powered_cache_preload_post_types',
get_post_types(
array(
'public' => true,
'publicly_queryable' => true,
),
'names',
'or'
)
);
$types = array_map( 'esc_sql', $types );
$types = "'" . implode( "','", $types ) . "'";
$posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE ( post_type IN ( $types ) ) AND post_status = 'publish' ORDER BY ID ASC LIMIT {$offset},{$max_preload_item}" ); // phpcs:ignore
\PoweredCache\Utils\log( sprintf( 'Found posts: %s', count( $posts ) ) );
foreach ( $posts as $post_id ) {
$public_posts_url[] = get_permalink( $post_id );
}
return $public_posts_url;
}
/**
* Prep. public tax terms urls for preload queue
*/
public function prepare_public_tax_terms_urls() {
$public_tax_term_urls = [];
$taxonomies = get_taxonomies( [ 'public' => true ] );
/**
* Filters public taxonomies.
*
* @hook powered_cache_preload_taxonomies
*
* @param {array} $taxonomies Public taxonomies.
*
* @return {array} New value.
* @since 1.0
*/
$taxonomies = apply_filters( 'powered_cache_preload_taxonomies', $taxonomies );
foreach ( $taxonomies as $tax ) {
\PoweredCache\Utils\log( sprintf( 'Taxonomy added to queue: %s', $tax ) );
/**
* Filters taxonomy offset for preload.
*
* @hook powered_cache_preload_public_taxonomies_offset
*
* @param {int} $offset Public taxonomies.
*
* @return {int} New value.
* @since 2.0
*/
$offset = (int) apply_filters( 'powered_cache_preload_public_taxonomies_offset', 0 );
$limit = $this->preload_max_term_count();
/**
* Filters term query args.
*
* @hook powered_cache_preload_tax_term_args
*
* @param {array} $args Arguments for terms.
*
* @return {array} New value.
* @since 2.0
*/
$args = apply_filters(
'powered_cache_preload_tax_term_args',
[
'hide_empty' => false,
'orderby' => 'count',
'offset' => $offset,
'number' => $limit,
],
$tax
);
\PoweredCache\Utils\log( 'Taxonomy preload args: [powered_cache_preload_tax_term_args]:' . print_r( $args, true ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
$terms = get_terms( $tax, $args );
foreach ( $terms as $term ) {
$public_tax_term_urls[] = get_term_link( $term );
}
}
return $public_tax_term_urls;
}
/**
* Max number of posts that will preloaded
*
* @return mixed|void
*/
public function preload_max_post_count() {
/**
* Filters preload post count
*
* @hook powered_cache_preload_post_limit
*
* @param {int} $limit The number of posts that will preloaded.
*
* @return {int} New value.
* @since 2.0
*/
return apply_filters( 'powered_cache_preload_post_limit', 1000 );
}
/**
* Max number of public terms that will preloaded
*
* @return mixed|void
*/
public function preload_max_term_count() {
/**
* Filters preload term count
*
* @hook powered_cache_preload_term_limit
*
* @param {int} $limit The number of terms that will preloaded.
*
* @return {int} New value.
* @since 2.0
*/
return apply_filters( 'powered_cache_preload_term_limit', 100 );
}
/**
* Filters domains and URLs for resource hints of relation type
*
* @param array $urls URLs to print for resource hints.
* @param string $relation_type The relation type the URLs are printed for, e.g. 'preconnect' or 'prerender'.
*
* @return array $urls resource hints
* @since 2.2 "preconnect" hint split from dns prefetch
*/
public function dns_prefetch( $urls, $relation_type ) {
$domains = $this->get_prefetch_dns();
if ( $domains && is_array( $domains ) ) {
foreach ( $domains as $domain ) {
if ( 'dns-prefetch' === $relation_type ) {
$domain = str_replace( [ 'http://', 'https://' ], '//', $domain );
$urls[] = $domain;
}
}
}
return $urls;
}
/**
* Add "preconnect" hint for critical resources
*
* @param array $urls URLs
* @param string $relation_type the type of hint
*
* @return array $urls Resource list
* @since 2.2
*/
public function preconnect_resources( $urls, $relation_type ) {
$domains = $this->get_preconnect_resources();
if ( $domains && is_array( $domains ) ) {
foreach ( $domains as $domain ) {
if ( 'preconnect' === $relation_type ) {
$parsed = wp_parse_url( $domain );
if ( empty( $parsed['scheme'] ) ) {
$domain = set_url_scheme( $domain );
}
$urls[] = $domain;
}
}
}
return $urls;
}
/**
*
* Get the list of prefetch domains
*
* @return mixed|void
*/
public function get_prefetch_dns() {
$settings = \PoweredCache\Utils\get_settings();
$prefetch_dns = preg_split( '#(\r\n|\r|\n)#', $settings['prefetch_dns'], - 1, PREG_SPLIT_NO_EMPTY );
/**
* Filters Prefetched DNS list.
*
* @hook powered_cache_prefetch_dns
*
* @param {array} $prefetch_dns The list of prefetch domains.
*
* @return {array} New value.
* @since 2.0
*/
return apply_filters( 'powered_cache_prefetch_dns', $prefetch_dns );
}
/**
* Get the list of preconnect domains
*
* @return mixed|void
* @since 2.2
*/
public function get_preconnect_resources() {
$settings = \PoweredCache\Utils\get_settings();
$preconnect_resources = preg_split( '#(\r\n|\r|\n)#', $settings['preconnect_resource'], - 1, PREG_SPLIT_NO_EMPTY );
/**
* Filters Preconnect resource list.
*
* @hook powered_cache_preconnect_resource
*
* @param {array} $preconnect_resources The list of prefetch domains.
*
* @return {array} New value.
* @since 2.2
*/
return apply_filters( 'powered_cache_preconnect_resource', $preconnect_resources );
}
/**
* Make preload request
*
* @param string $url Target URL
* @param array $args request args
*
* @return array|\WP_Error
*/
public static function preload_request( $url, $args = [] ) {
/**
* Filters args of preload requests.
*
* @hook powered_cache_preload_url_request_args
*
* @param {array} $args Request defaults.
*
* @return {array} New value.
* @since 2.0
*/
$request_args = apply_filters(
'powered_cache_preload_url_request_args',
[
'timeout' => 0.01,
'blocking' => false,
'user-agent' => 'Powered Cache Preloader',
'sslverify' => false,
]
);
$args = wp_parse_args( $args, $request_args );
/**
* Fires before doing preload HTTP request.
*
* @hook powered_cache_preload_http_request
*
* @param {string} $url Preload URL.
* @param {array} $args Request arguments.
*
* @since 2.0
*/
do_action( 'powered_cache_preload_http_request', $url, $args );
\PoweredCache\Utils\log( sprintf( 'Processing..: %s', $url ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
return wp_remote_get( esc_url_raw( $url ), $args );
}
/**
* Wait internal between HTTP reqs
*
* @param int $delay delay time in microseconds
*/
public static function wait( $delay = 500000 ) {
/**
* Filters wait time between preload requests.
*
* @hook powered_cache_preload_request_interval
*
* @param {int} $delay Delay time in microseconds.
*
* @return {int} New value.
* @since 2.0
*/
$delay = absint( apply_filters( 'powered_cache_preload_request_interval', $delay ) );
// Convert the delay to seconds and microseconds
$seconds = intdiv( $delay, 1000000 ); // Get full seconds
$microseconds = $delay % 1000000; // Get remaining microseconds
// Use sleep() for full second delays
if ( $seconds > 0 ) {
sleep( $seconds );
}
// Use usleep() for remaining microseconds
// sleeping more than 1 seconds may not be supported by the operating system with usleep
if ( $microseconds > 0 ) {
usleep( $microseconds );
}
}
/**
* Get mobile user agent for preload requests
*
* @return mixed|void
*/
public static function mobile_user_agent() {
/**
* Filters mobile agent name for mobile preload requests
*
* @hook powered_cache_preload_mobile_user_agent
*
* @param {string} $agent Mobile agent name.
*
* @return {string} New value.
* @since 2.0
*/
return apply_filters( 'powered_cache_preload_mobile_user_agent', 'Powered Cache Preloader mobile iPhone' );
}
/**
* Add a URL to the preload queue with optional filtering.
*
* @param string $url The URL to add to the preload queue.
*
* @since 3.4
*/
protected function add_url_to_preload_queue( $url ) {
/**
* Filters whether a URL should be added to the preload queue.
*
* @hook powered_cache_preload_add_url_to_queue
*
* @param {boolean} $preload Whether to preload the URL. Default true.
* @param {string} $url The URL to be preloaded.
*
* @return {boolean} Whether to preload the URL.
* @since 3.4
*/
$do_preload = apply_filters( 'powered_cache_preload_add_url_to_queue', true, $url );
if ( $do_preload ) {
$this->get_preloader()->push_to_queue( $url );
$this->queue_dirty = true;
\PoweredCache\Utils\log( sprintf( 'URL added to preload queue : %s', $url ) );
} else {
\PoweredCache\Utils\log( sprintf( 'URL skipped from preload queue: %s', $url ) );
}
}
/**
* Dispatch the preload queue if it has been modified.
*
* @return void
* @since 3.6
*/
public function dispatch_preload_queue() {
if ( ! $this->queue_dirty ) {
return;
}
// This will serialize the queue into the DB and fire off the async request
$this->get_preloader()->save()->dispatch();
\PoweredCache\Utils\log( 'Dispatched preload queue.' );
}
}
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Actions</h3><ul><li><a href="powered_cache_admin_page_after_settings_nav.html">powered_cache_admin_page_after_settings_nav</a></li><li><a href="powered_cache_admin_page_before_file_optimization.html">powered_cache_admin_page_before_file_optimization</a></li><li><a href="powered_cache_advanced_cache_purge_on_comment_update.html">powered_cache_advanced_cache_purge_on_comment_update</a></li><li><a href="powered_cache_advanced_cache_purge_post.html">powered_cache_advanced_cache_purge_post</a></li><li><a href="powered_cache_after_clean_up.html">powered_cache_after_clean_up</a></li><li><a href="powered_cache_cache_dir_htaccess_file_content.html">powered_cache_cache_dir_htaccess_file_content</a></li><li><a href="powered_cache_cdn_setup.html">powered_cache_cdn_setup</a></li><li><a href="powered_cache_clean_site_cache_dir.html">powered_cache_clean_site_cache_dir</a></li><li><a href="powered_cache_create_config_file.html">powered_cache_create_config_file</a></li><li><a href="powered_cache_flushed.html">powered_cache_flushed</a></li><li><a href="powered_cache_fo_js_concat_did_items.html">powered_cache_fo_js_concat_did_items</a></li><li><a href="powered_cache_get_url_dir.html">powered_cache_get_url_dir</a></li><li><a href="powered_cache_init.html">powered_cache_init</a></li><li><a href="powered_cache_lazy_load_compat.html">powered_cache_lazy_load_compat</a></li><li><a href="powered_cache_lazy_load_filter.html">powered_cache_lazy_load_filter</a></li><li><a href="powered_cache_lazy_load_placeholder_url.html">powered_cache_lazy_load_placeholder_url</a></li><li><a href="powered_cache_loaded.html">powered_cache_loaded</a></li><li><a href="powered_cache_mobile_browsers.html">powered_cache_mobile_browsers</a></li><li><a href="powered_cache_mobile_prefixes.html">powered_cache_mobile_prefixes</a></li><li><a href="powered_cache_page_cache_enable.html">powered_cache_page_cache_enable</a></li><li><a href="powered_cache_page_cached.html">powered_cache_page_cached</a></li><li><a href="powered_cache_preload_http_request.html">powered_cache_preload_http_request</a></li><li><a href="powered_cache_purge_all_cache.html">powered_cache_purge_all_cache</a></li><li><a href="powered_cache_settings_saved.html">powered_cache_settings_saved</a></li><li><a href="powered_cache_updated.html">powered_cache_updated</a></li></ul><h3>Filters</h3><ul><li><a href="populate_preload_queue_urls.html">populate_preload_queue_urls</a></li><li><a href="powered_cache_accepted_query_strings.html">powered_cache_accepted_query_strings</a></li><li><a href="powered_cache_advanced_cache_file_content.html">powered_cache_advanced_cache_file_content</a></li><li><a href="powered_cache_advanced_cache_purge_urls.html">powered_cache_advanced_cache_purge_urls</a></li><li><a href="powered_cache_after_htaccess.html">powered_cache_after_htaccess</a></li><li><a href="powered_cache_auto_htaccess_update.html">powered_cache_auto_htaccess_update</a></li><li><a href="powered_cache_browser_cache.html">powered_cache_browser_cache</a></li><li><a href="powered_cache_browser_cache_assets_lifespan.html">powered_cache_browser_cache_assets_lifespan</a></li><li><a href="powered_cache_browser_cache_default_lifespan.html">powered_cache_browser_cache_default_lifespan</a></li><li><a href="powered_cache_browser_cache_lifespan.html">powered_cache_browser_cache_lifespan</a></li><li><a href="powered_cache_cache_purge_interval.html">powered_cache_cache_purge_interval</a></li><li><a href="powered_cache_cache_query_strings.html">powered_cache_cache_query_strings</a></li><li><a href="powered_cache_cdn_addresses.html">powered_cache_cdn_addresses</a></li><li><a href="powered_cache_cdn_disable.html">powered_cache_cdn_disable</a></li><li><a href="powered_cache_cdn_extensions.html">powered_cache_cdn_extensions</a></li><li><a href="powered_cache_cdn_image_extensions.html">powered_cache_cdn_image_extensions</a></li><li><a href="powered_cache_cdn_rewrite_relative_urls.html">powered_cache_cdn_rewrite_relative_urls</a></li><li><a href="powered_cache_cdn_site_hostnames.html">powered_cache_cdn_site_hostnames</a></li><li><a href="powered_cache_cdn_zones.html">powered_cache_cdn_zones</a></li><li><a href="powered_cache_default_settings.html">powered_cache_default_settings</a></li><li><a href="powered_cache_defer_exclusions.html">powered_cache_defer_exclusions</a></li><li><a href="powered_cache_delay_exclusions.html">powered_cache_delay_exclusions</a></li><li><a href="powered_cache_delayed_js_script_content.html">powered_cache_delayed_js_script_content</a></li><li><a href="powered_cache_delayed_js_script_loader.html">powered_cache_delayed_js_script_loader</a></li><li><a href="powered_cache_delayed_js_skip.html">powered_cache_delayed_js_skip</a></li><li><a href="powered_cache_delayed_js_timeout.html">powered_cache_delayed_js_timeout</a></li><li><a href="powered_cache_disable_advanced_cache_notices.html">powered_cache_disable_advanced_cache_notices</a></li><li><a href="powered_cache_disable_js_defer.html">powered_cache_disable_js_defer</a></li><li><a href="powered_cache_disable_js_defer_inline.html">powered_cache_disable_js_defer_inline</a></li><li><a href="powered_cache_disable_native_lazyload.html">powered_cache_disable_native_lazyload</a></li><li><a href="powered_cache_fo_allow_gzip_compression.html">powered_cache_fo_allow_gzip_compression</a></li><li><a href="powered_cache_fo_cache_ttl.html">powered_cache_fo_cache_ttl</a></li><li><a href="powered_cache_fo_css_do_concat.html">powered_cache_fo_css_do_concat</a></li><li><a href="powered_cache_fo_dashboard.html">powered_cache_fo_dashboard</a></li><li><a href="powered_cache_fo_disable.html">powered_cache_fo_disable</a></li><li><a href="powered_cache_fo_disable_css_combine.html">powered_cache_fo_disable_css_combine</a></li><li><a href="powered_cache_fo_disable_css_minify.html">powered_cache_fo_disable_css_minify</a></li><li><a href="powered_cache_fo_disable_html_minify.html">powered_cache_fo_disable_html_minify</a></li><li><a href="powered_cache_fo_disable_js_combine.html">powered_cache_fo_disable_js_combine</a></li><li><a href="powered_cache_fo_disable_js_minify.html">powered_cache_fo_disable_js_minify</a></li><li><a href="powered_cache_fo_excluded_css_files.html">powered_cache_fo_excluded_css_files</a></li><li><a href="powered_cache_fo_excluded_js_files.html">powered_cache_fo_excluded_js_files</a></li><li><a href="powered_cache_fo_google_font_display.html">powered_cache_fo_google_font_display</a></li><li><a href="powered_cache_fo_google_fonts_domain.html">powered_cache_fo_google_fonts_domain</a></li><li><a href="powered_cache_fo_js_do_concat.html">powered_cache_fo_js_do_concat</a></li><li><a href="powered_cache_fo_relative_path.html">powered_cache_fo_relative_path</a></li><li><a href="powered_cache_fo_script_loader_tag.html">powered_cache_fo_script_loader_tag</a></li><li><a href="powered_cache_fo_site_url.html">powered_cache_fo_site_url</a></li><li><a href="powered_cache_fo_style_loader_tag.html">powered_cache_fo_style_loader_tag</a></li><li><a href="powered_cache_get_page_cache_dir.html">powered_cache_get_page_cache_dir</a></li><li><a href="powered_cache_htaccess_add_cors.html">powered_cache_htaccess_add_cors</a></li><li><a href="powered_cache_htaccess_cache_control_rules.html">powered_cache_htaccess_cache_control_rules</a></li><li><a href="powered_cache_htaccess_enable_gzip_compression.html">powered_cache_htaccess_enable_gzip_compression</a></li><li><a href="powered_cache_ignored_query_strings.html">powered_cache_ignored_query_strings</a></li><li><a href="powered_cache_js_execution_methods.html">powered_cache_js_execution_methods</a></li><li><a href="powered_cache_known_headers.html">powered_cache_known_headers</a></li><li><a href="powered_cache_lazy_load_avatar.html">powered_cache_lazy_load_avatar</a></li><li><a href="powered_cache_lazy_load_enabled.html">powered_cache_lazy_load_enabled</a></li><li><a href="powered_cache_lazy_load_exclusions.html">powered_cache_lazy_load_exclusions</a></li><li><a href="powered_cache_lazy_load_html.html">powered_cache_lazy_load_html</a></li><li><a href="powered_cache_lazy_load_iframes.html">powered_cache_lazy_load_iframes</a></li><li><a href="powered_cache_lazy_load_images.html">powered_cache_lazy_load_images</a></li><li><a href="powered_cache_lazy_load_post_content.html">powered_cache_lazy_load_post_content</a></li><li><a href="powered_cache_lazy_load_post_thumbnail.html">powered_cache_lazy_load_post_thumbnail</a></li><li><a href="powered_cache_lazy_load_run_filter.html">powered_cache_lazy_load_run_filter</a></li><li><a href="powered_cache_lazy_load_skip_classes.html">powered_cache_lazy_load_skip_classes</a></li><li><a href="powered_cache_lazy_load_skip_first_nth_img.html">powered_cache_lazy_load_skip_first_nth_img</a></li><li><a href="powered_cache_lazy_load_threshold.html">powered_cache_lazy_load_threshold</a></li><li><a href="powered_cache_lazy_load_widget_text.html">powered_cache_lazy_load_widget_text</a></li><li><a href="powered_cache_lazy_load_youtube.html">powered_cache_lazy_load_youtube</a></li><li><a href="powered_cache_lazy_load_youtube_css.html">powered_cache_lazy_load_youtube_css</a></li><li><a href="powered_cache_log_destination.html">powered_cache_log_destination</a></li><li><a href="powered_cache_log_message.html">powered_cache_log_message</a></li><li><a href="powered_cache_log_message_type.html">powered_cache_log_message_type</a></li><li><a href="powered_cache_maybe_1and1_hosting.html">powered_cache_maybe_1and1_hosting</a></li><li><a href="powered_cache_mod_rewrite.html">powered_cache_mod_rewrite</a></li><li><a href="powered_cache_object_cache_dropins.html">powered_cache_object_cache_dropins</a></li><li><a href="powered_cache_object_cache_file_content.html">powered_cache_object_cache_file_content</a></li><li><a href="powered_cache_page_cache_meta_info.html">powered_cache_page_cache_meta_info</a></li><li><a href="powered_cache_page_cache_meta_params.html">powered_cache_page_cache_meta_params</a></li><li><a href="powered_cache_page_caching_buffer.html">powered_cache_page_caching_buffer</a></li><li><a href="powered_cache_post_related_urls.html">powered_cache_post_related_urls</a></li><li><a href="powered_cache_pre_htaccess.html">powered_cache_pre_htaccess</a></li><li><a href="powered_cache_preconnect_resource.html">powered_cache_preconnect_resource</a></li><li><a href="powered_cache_prefetch_dns.html">powered_cache_prefetch_dns</a></li><li><a href="powered_cache_preload_add_url_to_queue.html">powered_cache_preload_add_url_to_queue</a></li><li><a href="powered_cache_preload_expired_urls.html">powered_cache_preload_expired_urls</a></li><li><a href="powered_cache_preload_mobile_user_agent.html">powered_cache_preload_mobile_user_agent</a></li><li><a href="powered_cache_preload_post_limit.html">powered_cache_preload_post_limit</a></li><li><a href="powered_cache_preload_post_types.html">powered_cache_preload_post_types</a></li><li><a href="powered_cache_preload_public_posts_offset.html">powered_cache_preload_public_posts_offset</a></li><li><a href="powered_cache_preload_public_taxonomies_offset.html">powered_cache_preload_public_taxonomies_offset</a></li><li><a href="powered_cache_preload_request_interval.html">powered_cache_preload_request_interval</a></li><li><a href="powered_cache_preload_tax_term_args.html">powered_cache_preload_tax_term_args</a></li><li><a href="powered_cache_preload_taxonomies.html">powered_cache_preload_taxonomies</a></li><li><a href="powered_cache_preload_term_limit.html">powered_cache_preload_term_limit</a></li><li><a href="powered_cache_preload_url_request_args.html">powered_cache_preload_url_request_args</a></li><li><a href="powered_cache_preloader_max_server_load.html">powered_cache_preloader_max_server_load</a></li><li><a href="powered_cache_preloader_should_continue.html">powered_cache_preloader_should_continue</a></li><li><a href="powered_cache_rejected_cookies.html">powered_cache_rejected_cookies</a></li><li><a href="powered_cache_rejected_referrers.html">powered_cache_rejected_referrers</a></li><li><a href="powered_cache_rejected_uri_list.html">powered_cache_rejected_uri_list</a></li><li><a href="powered_cache_rejected_user_agents.html">powered_cache_rejected_user_agents</a></li><li><a href="powered_cache_sanitized_options.html">powered_cache_sanitized_options</a></li><li><a href="powered_cache_scheduled_cleanup_frequency_options.html">powered_cache_scheduled_cleanup_frequency_options</a></li><li><a href="powered_cache_site_cache_dir.html">powered_cache_site_cache_dir</a></li><li><a href="powered_cache_vary_cookies.html">powered_cache_vary_cookies</a></li></ul>
</nav>
<br class="clear">
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>