LiteSpeed Cache - Version 4.3

Version Description

  • Aug 16 2021 =
  • UCSS Separated UCSS Purge from CCSS Purge. ( Contributed by Alice Tang #PR388)
  • Cloud Fixed an issue where CCSS/UCSS quota data failed to update locally.
  • Cloud Added server load as a factor when detecting node availability.
  • Cloud Improved the speed of checking daily quota and showing the related error message.
  • Cloud Added ability to re-detect node availability if the current node is responding w/ a heavy load code.
  • Cloud CCSS/UCSS/LQIP queue now exits immediately when quota is depleted.
  • Cloud Replaced separate d/regionnodes with a single d/nodes in the node list API for image optimization.
  • LQIP Fixed an issue with LQIP network compatibility. ( Contributed by Alice Tang #PR387)
  • GUEST JS no longer preloads for Guest Optimization. (@Ankit)
  • Data Fixed an issue where deleting the cssjs data folder causes a failure in the upgrade process. (@Joshua #PR391)
  • GUI Fixed a potential dashboard PHP warning when no queue existed. (@jrmora)
  • GUI Added daily quota on dashboard.
  • GUI Added downgrade warning to Toolbox -> Beta Test.
  • GUI Tuned .litespeed-desc class to full width in CSS.
  • Conf Preserve EXIF/XMP data now defaults to ON due to copyright concerns. (@Tobolo)
  • 3rd Fixed a PHP warning when using Google AMP w/ /amp as structure. (@thanhstran98)
Download this release

Release Info

Developer LiteSpeedTech
Plugin Icon 128x128 LiteSpeed Cache
Version 4.3
Comparing to
See all releases

Code changes from version 4.2 to 4.3

assets/css/litespeed.css CHANGED
@@ -398,7 +398,7 @@ button.litespeed-form-action:hover {
398
  color: #7a919e;
399
  margin: 10px 0;
400
  line-height: 1.7;
401
- max-width: 840px;
402
  }
403
 
404
  .litespeed-desc+.litespeed-desc {
398
  color: #7a919e;
399
  margin: 10px 0;
400
  line-height: 1.7;
401
+ /*max-width: 840px;*/
402
  }
403
 
404
  .litespeed-desc+.litespeed-desc {
data/const.default.ini CHANGED
@@ -418,16 +418,20 @@ object-pswd = ''
418
 
419
  object-global_groups = 'users
420
  userlogins
 
 
421
  usermeta
422
  user_meta
423
  site-transient
424
  site-options
425
  site-lookup
 
426
  blog-lookup
427
  blog-details
 
428
  rss
429
  global-posts
430
- blog-id-cache'
431
 
432
  object-non_persistent_groups = 'comment
433
  counts
@@ -534,7 +538,7 @@ img_optm-webp = true
534
 
535
  img_optm-lossless = false
536
 
537
- img_optm-exif = false
538
 
539
  img_optm-webp_replace = false
540
 
418
 
419
  object-global_groups = 'users
420
  userlogins
421
+ useremail
422
+ userslugs
423
  usermeta
424
  user_meta
425
  site-transient
426
  site-options
427
  site-lookup
428
+ site-details
429
  blog-lookup
430
  blog-details
431
+ blog-id-cache
432
  rss
433
  global-posts
434
+ global-cache-test'
435
 
436
  object-non_persistent_groups = 'comment
437
  counts
538
 
539
  img_optm-lossless = false
540
 
541
+ img_optm-exif = true
542
 
543
  img_optm-webp_replace = false
544
 
data/const.network_default.ini CHANGED
@@ -84,14 +84,20 @@ object-global_groups = 'users
84
  userlogins
85
  usermeta
86
  user_meta
 
 
 
 
87
  site-transient
88
  site-options
89
  site-lookup
90
  blog-lookup
 
91
  blog-details
 
92
  rss
93
  global-posts
94
- blog-id-cache'
95
 
96
  object-non_persistent_groups = 'comment
97
  counts
84
  userlogins
85
  usermeta
86
  user_meta
87
+ useremail
88
+ userslugs
89
+ sites
90
+ site-details
91
  site-transient
92
  site-options
93
  site-lookup
94
  blog-lookup
95
+ blog-id-cache
96
  blog-details
97
+ networks
98
  rss
99
  global-posts
100
+ global-cache-test'
101
 
102
  object-non_persistent_groups = 'comment
103
  counts
lang/litespeed-cache.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the LiteSpeed Cache package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: LiteSpeed Cache 4.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
- "POT-Creation-Date: 2021-07-28 15:28:06+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -53,7 +53,7 @@ msgstr ""
53
  msgid "CDN"
54
  msgstr ""
55
 
56
- #: src/admin-display.cls.php:123 src/gui.cls.php:583
57
  #: tpl/dash/dashboard.tpl.php:55 tpl/dash/network_dash.tpl.php:27
58
  msgid "Image Optimization"
59
  msgstr ""
@@ -123,7 +123,7 @@ msgstr ""
123
  msgid "OFF"
124
  msgstr ""
125
 
126
- #: src/admin-display.cls.php:275 src/gui.cls.php:574
127
  msgid "Settings"
128
  msgstr ""
129
 
@@ -202,7 +202,7 @@ msgstr ""
202
  #: src/admin-display.cls.php:1079 tpl/cache/settings-esi.tpl.php:95
203
  #: tpl/page_optm/settings_css.tpl.php:165
204
  #: tpl/page_optm/settings_html.tpl.php:85
205
- #: tpl/page_optm/settings_media_exc.tpl.php:25
206
  #: tpl/page_optm/settings_tuning.tpl.php:35
207
  #: tpl/page_optm/settings_tuning.tpl.php:56
208
  #: tpl/page_optm/settings_tuning.tpl.php:143
@@ -278,72 +278,80 @@ msgstr ""
278
  msgid "Failed to communicate with Cloudflare"
279
  msgstr ""
280
 
281
- #: src/cloud.cls.php:348 src/cloud.cls.php:365 src/cloud.cls.php:396
282
- #: src/cloud.cls.php:509 src/cloud.cls.php:851
283
  msgid "Cloud Error"
284
  msgstr ""
285
 
286
- #: src/cloud.cls.php:396
287
  msgid "No available Cloud Node."
288
  msgstr ""
289
 
290
- #: src/cloud.cls.php:509
 
 
 
 
291
  msgid "Please try after %1$s for service %2$s."
292
  msgstr ""
293
 
294
- #: src/cloud.cls.php:592 src/cloud.cls.php:608
295
  msgid "Failed to request via WordPress"
296
  msgstr ""
297
 
298
- #: src/cloud.cls.php:622
 
 
 
 
299
  msgid ""
300
  "We are working hard to improve your online service experience. The service "
301
  "will be unavailable while we work. We apologize for any inconvenience."
302
  msgstr ""
303
 
304
- #: src/cloud.cls.php:631 src/cloud.cls.php:639 src/cloud.cls.php:887
305
  msgid "Message from QUIC.cloud server"
306
  msgstr ""
307
 
308
- #: src/cloud.cls.php:647
309
  msgid "Good news from QUIC.cloud server"
310
  msgstr ""
311
 
312
- #: src/cloud.cls.php:656
313
  msgid "%1$s plugin version %2$s required for this action."
314
  msgstr ""
315
 
316
- #: src/cloud.cls.php:698 src/cloud.cls.php:876
317
  msgid "Failed to communicate with QUIC.cloud server"
318
  msgstr ""
319
 
320
- #: src/cloud.cls.php:706
321
  msgid ""
322
  "Site not recognized. Domain Key has been automatically removed. Please "
323
  "request a new one."
324
  msgstr ""
325
 
326
- #: src/cloud.cls.php:707 src/error.cls.php:48
327
  msgid "Click here to set."
328
  msgstr ""
329
 
330
- #: src/cloud.cls.php:895
331
  msgid ""
332
  "Applied for Domain Key successfully. Please wait for result. Domain Key will "
333
  "be automatically sent to your WordPress."
334
  msgstr ""
335
 
336
- #: src/cloud.cls.php:946
337
  msgid ""
338
  "Congratulations, your Domain Key has been approved! The setting has been "
339
  "updated accordingly."
340
  msgstr ""
341
 
342
- #: src/cloud.cls.php:1017
343
  msgid "Domain Key hash mismatch"
344
  msgstr ""
345
 
346
- #: src/cloud.cls.php:1128
347
  msgid "Sync credit allowance with Cloud Server successfully."
348
  msgstr ""
349
 
@@ -383,25 +391,25 @@ msgstr ""
383
  msgid "Previously existed in blacklist"
384
  msgstr ""
385
 
386
- #: src/css.cls.php:562
387
- msgid "Queue cleared successfully"
388
  msgstr ""
389
 
390
- #: src/css.cls.php:572
391
  msgid "%1$s %2$s files left in queue"
392
  msgstr ""
393
 
394
- #: src/css.cls.php:573
395
  msgid "Cancel"
396
  msgstr ""
397
 
398
- #: src/data.cls.php:210
399
  msgid ""
400
  "The database has been upgrading in the background since %s. This message "
401
  "will disappear once upgrade is complete."
402
  msgstr ""
403
 
404
- #: src/data.upgrade.func.php:73
405
  msgid ""
406
  "LiteSpeed Cache upgraded successfully. NOTE: Due to changes in this version, "
407
  "the settings %1$s and %2$s have been turned OFF. Please turn them back on "
@@ -409,15 +417,15 @@ msgid ""
409
  "errors."
410
  msgstr ""
411
 
412
- #: src/data.upgrade.func.php:73 src/lang.cls.php:114
413
  msgid "JS Combine"
414
  msgstr ""
415
 
416
- #: src/data.upgrade.func.php:73
417
  msgid "JS Defer"
418
  msgstr ""
419
 
420
- #: src/data.upgrade.func.php:74
421
  msgid "Click here to settings"
422
  msgstr ""
423
 
@@ -526,11 +534,11 @@ msgid "You will need to set %s to use the online services."
526
  msgstr ""
527
 
528
  #: src/error.cls.php:52
529
- msgid "You don't have enough daily quota for current service left today."
530
  msgstr ""
531
 
532
  #: src/error.cls.php:56
533
- msgid "You don't have enough quota for current service left this month."
534
  msgstr ""
535
 
536
  #: src/error.cls.php:60
@@ -568,96 +576,104 @@ msgid ""
568
  msgstr ""
569
 
570
  #: src/error.cls.php:92
 
 
 
 
 
 
 
 
571
  msgid "Credits are not enough to proceed the current request."
572
  msgstr ""
573
 
574
- #: src/error.cls.php:96 src/error.cls.php:120
575
  msgid "%s file not writable."
576
  msgstr ""
577
 
578
- #: src/error.cls.php:104
579
  msgid "Could not find %1$s in %2$s."
580
  msgstr ""
581
 
582
- #: src/error.cls.php:108
583
  msgid "Invalid login cookie. Please check the %s file."
584
  msgstr ""
585
 
586
- #: src/error.cls.php:112
587
  msgid "Failed to back up %s file, aborted changes."
588
  msgstr ""
589
 
590
- #: src/error.cls.php:116
591
  msgid "%s file not readable."
592
  msgstr ""
593
 
594
- #: src/error.cls.php:124
595
  msgid "Failed to get %s file contents."
596
  msgstr ""
597
 
598
- #: src/error.cls.php:128
599
  msgid "Failed to create table %s! SQL: %s."
600
  msgstr ""
601
 
602
- #: src/error.cls.php:132
603
  msgid "Crawler disabled by the server admin."
604
  msgstr ""
605
 
606
- #: src/error.cls.php:137
607
  msgid "Previous request too recent. Please try again later."
608
  msgstr ""
609
 
610
- #: src/error.cls.php:141
611
  msgid "Previous request too recent. Please try again after %s."
612
  msgstr ""
613
 
614
- #: src/error.cls.php:145
615
  msgid "Your application is waiting for approval."
616
  msgstr ""
617
 
618
- #: src/error.cls.php:149
619
  msgid "The callback validation to your domain failed due to hash mismatch."
620
  msgstr ""
621
 
622
- #: src/error.cls.php:153
623
  msgid ""
624
  "The callback validation to your domain failed. Please make sure there is no "
625
  "firewall blocking our servers."
626
  msgstr ""
627
 
628
- #: src/error.cls.php:157
629
  msgid ""
630
  "The callback validation to your domain failed. Please make sure there is no "
631
  "firewall blocking our servers. Response code: "
632
  msgstr ""
633
 
634
- #: src/error.cls.php:161
635
  msgid ""
636
  "Your domain has been forbidden from using our services due to a previous "
637
  "policy violation."
638
  msgstr ""
639
 
640
- #: src/error.cls.php:165
641
  msgid "Unknown error"
642
  msgstr ""
643
 
644
- #: src/file.cls.php:140
645
  msgid "Folder does not exist: %s"
646
  msgstr ""
647
 
648
- #: src/file.cls.php:149
649
  msgid "Can not create folder: %1$s. Error: %2$s"
650
  msgstr ""
651
 
652
- #: src/file.cls.php:157
653
  msgid "Folder is not writable: %s."
654
  msgstr ""
655
 
656
- #: src/file.cls.php:164 src/file.cls.php:169
657
  msgid "File %s is not writable."
658
  msgstr ""
659
 
660
- #: src/file.cls.php:176
661
  msgid "Failed to write to %s."
662
  msgstr ""
663
 
@@ -707,85 +723,86 @@ msgstr ""
707
 
708
  #: src/gui.cls.php:461 src/gui.cls.php:469 src/gui.cls.php:477
709
  #: src/gui.cls.php:486 src/gui.cls.php:496 src/gui.cls.php:506
710
- #: src/gui.cls.php:516 src/gui.cls.php:526 src/gui.cls.php:592
711
- #: src/gui.cls.php:600 src/gui.cls.php:608 src/gui.cls.php:617
712
  #: src/gui.cls.php:627 src/gui.cls.php:637 src/gui.cls.php:647
713
- #: src/gui.cls.php:657 src/gui.cls.php:667
714
- #: tpl/page_optm/settings_media.tpl.php:125 tpl/toolbox/purge.tpl.php:37
715
- #: tpl/toolbox/purge.tpl.php:43 tpl/toolbox/purge.tpl.php:52
716
- #: tpl/toolbox/purge.tpl.php:61 tpl/toolbox/purge.tpl.php:70
717
- #: tpl/toolbox/purge.tpl.php:79 tpl/toolbox/purge.tpl.php:88
718
- #: tpl/toolbox/purge.tpl.php:97
 
719
  msgid "Purge All"
720
  msgstr ""
721
 
722
- #: src/gui.cls.php:469 src/gui.cls.php:550 src/gui.cls.php:600
723
  msgid "LSCache"
724
  msgstr ""
725
 
726
- #: src/gui.cls.php:477 src/gui.cls.php:608 tpl/toolbox/purge.tpl.php:43
727
  msgid "CSS/JS Cache"
728
  msgstr ""
729
 
730
- #: src/gui.cls.php:486 src/gui.cls.php:627 src/lang.cls.php:82
731
- #: tpl/dash/dashboard.tpl.php:388 tpl/toolbox/purge.tpl.php:52
732
  msgid "Object Cache"
733
  msgstr ""
734
 
735
- #: src/gui.cls.php:496 src/gui.cls.php:637 tpl/toolbox/purge.tpl.php:61
736
  msgid "Opcode Cache"
737
  msgstr ""
738
 
739
- #: src/gui.cls.php:516 src/gui.cls.php:657
740
- #: tpl/page_optm/settings_media.tpl.php:125 tpl/toolbox/purge.tpl.php:79
741
  msgid "LQIP Cache"
742
  msgstr ""
743
 
744
- #: src/gui.cls.php:526 src/gui.cls.php:667 src/lang.cls.php:142
745
- #: tpl/toolbox/purge.tpl.php:88
746
  msgid "Gravatar Cache"
747
  msgstr ""
748
 
749
- #: src/gui.cls.php:550
750
  msgid "LiteSpeed Cache Purge All"
751
  msgstr ""
752
 
753
- #: src/gui.cls.php:566 tpl/cdn/entry.tpl.php:7 tpl/cdn/settings.tpl.php:194
754
  #: tpl/db_optm/entry.tpl.php:6
755
  msgid "Manage"
756
  msgstr ""
757
 
758
- #: src/gui.cls.php:617 tpl/cdn/manage.tpl.php:17
759
  msgid "Cloudflare"
760
  msgstr ""
761
 
762
- #: src/gui.cls.php:686 tpl/img_optm/summary.tpl.php:175
763
  msgid "Remove all previous unfinished image optimization requests."
764
  msgstr ""
765
 
766
- #: src/gui.cls.php:687 tpl/img_optm/summary.tpl.php:177
767
  msgid "Clean Up Unfinished Data"
768
  msgstr ""
769
 
770
- #: src/gui.cls.php:705
771
  msgid "Install %s"
772
  msgstr ""
773
 
774
- #: src/gui.cls.php:706
775
  msgid "Install Now"
776
  msgstr ""
777
 
778
- #: src/gui.cls.php:725
779
  msgid ""
780
  "<a href=\"%1$s\" %2$s>View version %3$s details</a> or <a href=\"%4$s\" %5$s "
781
  "target=\"_blank\">update now</a>."
782
  msgstr ""
783
 
784
- #: src/gui.cls.php:728
785
  msgid "View %1$s version %2$s details"
786
  msgstr ""
787
 
788
- #: src/gui.cls.php:733
789
  msgid "Update %s now"
790
  msgstr ""
791
 
@@ -919,11 +936,11 @@ msgstr ""
919
  msgid "Images not requested"
920
  msgstr ""
921
 
922
- #: src/lang.cls.php:24 tpl/dash/dashboard.tpl.php:329
923
  msgid "Images requested"
924
  msgstr ""
925
 
926
- #: src/lang.cls.php:25 tpl/dash/dashboard.tpl.php:339
927
  msgid "Images notified to pull"
928
  msgstr ""
929
 
@@ -979,7 +996,7 @@ msgstr ""
979
  msgid "Enable Cache"
980
  msgstr ""
981
 
982
- #: src/lang.cls.php:59 tpl/dash/dashboard.tpl.php:389
983
  msgid "Browser Cache"
984
  msgstr ""
985
 
@@ -1733,71 +1750,71 @@ msgstr ""
1733
  msgid "LQIP image preview for size %s"
1734
  msgstr ""
1735
 
1736
- #: src/placeholder.cls.php:544
1737
- msgid "Queue cleared successfully."
1738
- msgstr ""
1739
-
1740
- #: src/purge.cls.php:175
1741
  msgid "Purged all caches successfully."
1742
  msgstr ""
1743
 
1744
- #: src/purge.cls.php:194
1745
  msgid "Notified LiteSpeed Web Server to purge all LSCache entries."
1746
  msgstr ""
1747
 
1748
- #: src/purge.cls.php:214
1749
  msgid "Cleaned all Critical CSS files."
1750
  msgstr ""
1751
 
1752
- #: src/purge.cls.php:231
 
 
 
 
1753
  msgid "Cleaned all LQIP files."
1754
  msgstr ""
1755
 
1756
- #: src/purge.cls.php:248
1757
  msgid "Cleaned all Gravatar files."
1758
  msgstr ""
1759
 
1760
- #: src/purge.cls.php:277
1761
  msgid "Notified LiteSpeed Web Server to purge CSS/JS entries."
1762
  msgstr ""
1763
 
1764
- #: src/purge.cls.php:293
1765
  msgid "Opcode cache is not enabled."
1766
  msgstr ""
1767
 
1768
- #: src/purge.cls.php:305
1769
  msgid "Reset the entire opcode cache successfully."
1770
  msgstr ""
1771
 
1772
- #: src/purge.cls.php:333
1773
  msgid "Object cache is not enabled."
1774
  msgstr ""
1775
 
1776
- #: src/purge.cls.php:346
1777
  msgid "Purge all object caches successfully."
1778
  msgstr ""
1779
 
1780
- #: src/purge.cls.php:529
1781
  msgid "Notified LiteSpeed Web Server to purge the front page."
1782
  msgstr ""
1783
 
1784
- #: src/purge.cls.php:542
1785
  msgid "Notified LiteSpeed Web Server to purge all pages."
1786
  msgstr ""
1787
 
1788
- #: src/purge.cls.php:561
1789
  msgid "Notified LiteSpeed Web Server to purge error pages."
1790
  msgstr ""
1791
 
1792
- #: src/purge.cls.php:588
1793
  msgid "Purge category %s"
1794
  msgstr ""
1795
 
1796
- #: src/purge.cls.php:615
1797
  msgid "Purge tag %s"
1798
  msgstr ""
1799
 
1800
- #: src/purge.cls.php:646
1801
  msgid "Purge url %s"
1802
  msgstr ""
1803
 
@@ -1953,7 +1970,7 @@ msgstr ""
1953
  msgid "Dismiss this notice"
1954
  msgstr ""
1955
 
1956
- #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 4.2) #-#-#-#-#
1957
  #. Plugin Name of the plugin/theme
1958
  #: tpl/banner/new_version.php:59 tpl/banner/new_version_dev.tpl.php:12
1959
  #: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:8
@@ -1969,7 +1986,7 @@ msgid "New release %s is available now."
1969
  msgstr ""
1970
 
1971
  #: tpl/banner/new_version.php:71 tpl/banner/new_version_dev.tpl.php:24
1972
- #: tpl/toolbox/beta_test.tpl.php:46
1973
  msgid "Upgrade"
1974
  msgstr ""
1975
 
@@ -1993,26 +2010,26 @@ msgstr ""
1993
  msgid "Thank You for Using the LiteSpeed Cache Plugin!"
1994
  msgstr ""
1995
 
1996
- #: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:170
1997
  msgid "Page Load Time"
1998
  msgstr ""
1999
 
2000
  #: tpl/banner/score.php:34 tpl/banner/score.php:74
2001
- #: tpl/dash/dashboard.tpl.php:183 tpl/dash/dashboard.tpl.php:251
2002
  msgid "Before"
2003
  msgstr ""
2004
 
2005
  #: tpl/banner/score.php:45 tpl/banner/score.php:84
2006
- #: tpl/dash/dashboard.tpl.php:192 tpl/dash/dashboard.tpl.php:259
2007
  msgid "After"
2008
  msgstr ""
2009
 
2010
  #: tpl/banner/score.php:55 tpl/banner/score.php:94
2011
- #: tpl/dash/dashboard.tpl.php:200 tpl/dash/dashboard.tpl.php:267
2012
  msgid "Improved by"
2013
  msgstr ""
2014
 
2015
- #: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:227
2016
  msgid "PageSpeed Score"
2017
  msgstr ""
2018
 
@@ -2057,7 +2074,7 @@ msgid "TTL"
2057
  msgstr ""
2058
 
2059
  #: tpl/cache/entry.tpl.php:8 tpl/cache/entry_network.tpl.php:7
2060
- #: tpl/toolbox/entry.tpl.php:6 tpl/toolbox/purge.tpl.php:124
2061
  msgid "Purge"
2062
  msgstr ""
2063
 
@@ -2311,7 +2328,7 @@ msgid "The latest data file is"
2311
  msgstr ""
2312
 
2313
  #: tpl/cache/settings-esi.tpl.php:96
2314
- #: tpl/page_optm/settings_media_exc.tpl.php:26
2315
  #: tpl/page_optm/settings_tuning.tpl.php:36
2316
  #: tpl/page_optm/settings_tuning.tpl.php:57
2317
  #: tpl/page_optm/settings_tuning.tpl.php:144
@@ -3006,7 +3023,7 @@ msgid "Total"
3006
  msgstr ""
3007
 
3008
  #: tpl/crawler/blacklist.tpl.php:31 tpl/crawler/map.tpl.php:43
3009
- #: tpl/toolbox/purge.tpl.php:206
3010
  msgid "URL"
3011
  msgstr ""
3012
 
@@ -3077,7 +3094,7 @@ msgstr ""
3077
  msgid "Sitemap Total"
3078
  msgstr ""
3079
 
3080
- #: tpl/crawler/map.tpl.php:44 tpl/dash/dashboard.tpl.php:521
3081
  msgid "Crawler Status"
3082
  msgstr ""
3083
 
@@ -3250,19 +3267,19 @@ msgstr ""
3250
  msgid "Run time for previous crawler"
3251
  msgstr ""
3252
 
3253
- #: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:534
3254
  msgid "Current crawler started at"
3255
  msgstr ""
3256
 
3257
- #: tpl/crawler/summary.tpl.php:92 tpl/dash/dashboard.tpl.php:541
3258
  msgid "Last interval"
3259
  msgstr ""
3260
 
3261
- #: tpl/crawler/summary.tpl.php:99 tpl/dash/dashboard.tpl.php:548
3262
  msgid "Ended reason"
3263
  msgstr ""
3264
 
3265
- #: tpl/crawler/summary.tpl.php:106 tpl/dash/dashboard.tpl.php:555
3266
  msgid "<b>Last crawled:</b> %s item(s)"
3267
  msgstr ""
3268
 
@@ -3358,7 +3375,7 @@ msgstr ""
3358
  msgid "CDN Bandwidth"
3359
  msgstr ""
3360
 
3361
- #: tpl/dash/dashboard.tpl.php:58 tpl/dash/dashboard.tpl.php:489
3362
  msgid "Low Quality Image Placeholder"
3363
  msgstr ""
3364
 
@@ -3370,132 +3387,136 @@ msgstr ""
3370
  msgid "Usage"
3371
  msgstr ""
3372
 
3373
- #: tpl/dash/dashboard.tpl.php:127 tpl/dash/network_dash.tpl.php:90
3374
  msgid "PAYG Balance"
3375
  msgstr ""
3376
 
3377
- #: tpl/dash/dashboard.tpl.php:128 tpl/dash/network_dash.tpl.php:91
3378
  msgid "This Month Usage"
3379
  msgstr ""
3380
 
3381
- #: tpl/dash/dashboard.tpl.php:130 tpl/dash/network_dash.tpl.php:93
3382
  msgid "Pay as You Go Usage Statistics"
3383
  msgstr ""
3384
 
3385
- #: tpl/dash/dashboard.tpl.php:149 tpl/dash/network_dash.tpl.php:100
3386
  msgid "Total Usage"
3387
  msgstr ""
3388
 
3389
- #: tpl/dash/dashboard.tpl.php:150 tpl/dash/network_dash.tpl.php:101
3390
  msgid "Total images optimized in this month"
3391
  msgstr ""
3392
 
3393
- #: tpl/dash/dashboard.tpl.php:161
 
 
 
 
3394
  msgid "Go to QUIC.cloud dashboard"
3395
  msgstr ""
3396
 
3397
- #: tpl/dash/dashboard.tpl.php:173
3398
  msgid "Refresh page load time"
3399
  msgstr ""
3400
 
3401
- #: tpl/dash/dashboard.tpl.php:214 tpl/dash/dashboard.tpl.php:283
3402
- #: tpl/dash/dashboard.tpl.php:448 tpl/dash/dashboard.tpl.php:481
3403
- #: tpl/dash/dashboard.tpl.php:513
3404
  msgid "Last requested"
3405
  msgstr ""
3406
 
3407
- #: tpl/dash/dashboard.tpl.php:219
3408
  msgid "Current closest Cloud server is %s.&#10;Click to redetect."
3409
  msgstr ""
3410
 
3411
- #: tpl/dash/dashboard.tpl.php:219 tpl/img_optm/summary.tpl.php:57
3412
  #: tpl/page_optm/settings_css.tpl.php:83 tpl/page_optm/settings_css.tpl.php:184
3413
  #: tpl/page_optm/settings_media.tpl.php:176
3414
  msgid ""
3415
  "Are you sure you want to redetect the closest cloud server for this service?"
3416
  msgstr ""
3417
 
3418
- #: tpl/dash/dashboard.tpl.php:230
3419
  msgid "Refresh page score"
3420
  msgstr ""
3421
 
3422
- #: tpl/dash/dashboard.tpl.php:291 tpl/img_optm/entry.tpl.php:6
3423
  msgid "Image Optimization Summary"
3424
  msgstr ""
3425
 
3426
- #: tpl/dash/dashboard.tpl.php:292 tpl/dash/dashboard.tpl.php:381
3427
- #: tpl/dash/dashboard.tpl.php:424 tpl/dash/dashboard.tpl.php:457
3428
- #: tpl/dash/dashboard.tpl.php:490 tpl/dash/dashboard.tpl.php:522
3429
  msgid "More"
3430
  msgstr ""
3431
 
3432
- #: tpl/dash/dashboard.tpl.php:302
3433
  msgid "Image Groups Prepared"
3434
  msgstr ""
3435
 
3436
- #: tpl/dash/dashboard.tpl.php:317
3437
  msgid "Images Requested"
3438
  msgstr ""
3439
 
3440
- #: tpl/dash/dashboard.tpl.php:349 tpl/img_optm/summary.tpl.php:342
3441
  msgid "Last Request"
3442
  msgstr ""
3443
 
3444
- #: tpl/dash/dashboard.tpl.php:352
3445
  msgid "Last Pull"
3446
  msgstr ""
3447
 
3448
- #: tpl/dash/dashboard.tpl.php:380
3449
  msgid "Cache Status"
3450
  msgstr ""
3451
 
3452
- #: tpl/dash/dashboard.tpl.php:386
3453
  msgid "Public Cache"
3454
  msgstr ""
3455
 
3456
- #: tpl/dash/dashboard.tpl.php:387
3457
  msgid "Private Cache"
3458
  msgstr ""
3459
 
3460
- #: tpl/dash/dashboard.tpl.php:409
3461
  msgid "Cache Stats"
3462
  msgstr ""
3463
 
3464
- #: tpl/dash/dashboard.tpl.php:423 tpl/toolbox/purge.tpl.php:70
3465
  msgid "Critical CSS"
3466
  msgstr ""
3467
 
3468
- #: tpl/dash/dashboard.tpl.php:429 tpl/dash/dashboard.tpl.php:462
3469
- #: tpl/dash/dashboard.tpl.php:495 tpl/page_optm/settings_css.tpl.php:74
3470
  #: tpl/page_optm/settings_css.tpl.php:175
3471
  #: tpl/page_optm/settings_media.tpl.php:170
3472
  msgid "Last generated"
3473
  msgstr ""
3474
 
3475
- #: tpl/dash/dashboard.tpl.php:432 tpl/dash/dashboard.tpl.php:465
3476
- #: tpl/dash/dashboard.tpl.php:498
3477
  msgid "Time to execute previous request"
3478
  msgstr ""
3479
 
3480
- #: tpl/dash/dashboard.tpl.php:437 tpl/dash/dashboard.tpl.php:470
3481
- #: tpl/dash/dashboard.tpl.php:503
3482
  msgid "Requests in queue"
3483
  msgstr ""
3484
 
3485
- #: tpl/dash/dashboard.tpl.php:440 tpl/dash/dashboard.tpl.php:473
3486
- #: tpl/dash/dashboard.tpl.php:505
3487
  msgid "Force cron"
3488
  msgstr ""
3489
 
3490
- #: tpl/dash/dashboard.tpl.php:456
3491
  msgid "Unique CSS"
3492
  msgstr ""
3493
 
3494
- #: tpl/dash/dashboard.tpl.php:526
3495
  msgid "Crawler(s)"
3496
  msgstr ""
3497
 
3498
- #: tpl/dash/dashboard.tpl.php:529
3499
  msgid "Currently active crawler"
3500
  msgstr ""
3501
 
@@ -4378,7 +4399,7 @@ msgstr ""
4378
 
4379
  #: tpl/page_optm/settings_css.tpl.php:67
4380
  msgid ""
4381
- "Automatic generation of unused CSS is in the background via a cron-based "
4382
  "queue."
4383
  msgstr ""
4384
 
@@ -4577,8 +4598,9 @@ msgstr ""
4577
 
4578
  #: tpl/page_optm/settings_js.tpl.php:78
4579
  msgid ""
4580
- "Doing so can help reduce resource contention and improve performance causing "
4581
- "a lower FID (Core Web Vitals metric)."
 
4582
  msgstr ""
4583
 
4584
  #: tpl/page_optm/settings_localization.tpl.php:12
@@ -4759,7 +4781,12 @@ msgstr ""
4759
  msgid "Listed images will not be lazy loaded."
4760
  msgstr ""
4761
 
4762
- #: tpl/page_optm/settings_media_exc.tpl.php:27
 
 
 
 
 
4763
  #: tpl/page_optm/settings_tuning.tpl.php:37
4764
  #: tpl/page_optm/settings_tuning.tpl.php:58
4765
  #: tpl/page_optm/settings_tuning.tpl.php:145
@@ -4767,27 +4794,27 @@ msgstr ""
4767
  msgid "Elements with attribute %s in html code will be excluded."
4768
  msgstr ""
4769
 
4770
- #: tpl/page_optm/settings_media_exc.tpl.php:49
4771
  msgid "Images containing these class names will not be lazy loaded."
4772
  msgstr ""
4773
 
4774
- #: tpl/page_optm/settings_media_exc.tpl.php:64
4775
  msgid "Images having these parent class names will not be lazy loaded."
4776
  msgstr ""
4777
 
4778
- #: tpl/page_optm/settings_media_exc.tpl.php:78
4779
  msgid "Iframes containing these class names will not be lazy loaded."
4780
  msgstr ""
4781
 
4782
- #: tpl/page_optm/settings_media_exc.tpl.php:93
4783
  msgid "Iframes having these parent class names will not be lazy loaded."
4784
  msgstr ""
4785
 
4786
- #: tpl/page_optm/settings_media_exc.tpl.php:107
4787
  msgid "Prevent any lazy load of listed pages."
4788
  msgstr ""
4789
 
4790
- #: tpl/page_optm/settings_media_exc.tpl.php:121
4791
  msgid "These images will not generate LQIP."
4792
  msgstr ""
4793
 
@@ -4869,53 +4896,58 @@ msgstr ""
4869
  msgid "Selected roles will be excluded from all optimizations."
4870
  msgstr ""
4871
 
4872
- #: tpl/toolbox/beta_test.tpl.php:16
4873
  msgid "Try GitHub Version"
4874
  msgstr ""
4875
 
4876
- #: tpl/toolbox/beta_test.tpl.php:20
4877
  msgid ""
4878
  "Use this section to switch plugin versions. To beta test a GitHub commit, "
4879
  "enter the commit URL in the field below."
4880
  msgstr ""
4881
 
4882
- #: tpl/toolbox/beta_test.tpl.php:21
4883
  msgid "Example"
4884
  msgstr ""
4885
 
4886
- #: tpl/toolbox/beta_test.tpl.php:25
4887
  msgid "Use latest GitHub Dev commit"
4888
  msgstr ""
4889
 
4890
- #: tpl/toolbox/beta_test.tpl.php:27
4891
  msgid "Use latest GitHub Master commit"
4892
  msgstr ""
4893
 
4894
- #: tpl/toolbox/beta_test.tpl.php:29 tpl/toolbox/beta_test.tpl.php:40
4895
  msgid "Use latest WordPress release version"
4896
  msgstr ""
4897
 
4898
- #: tpl/toolbox/beta_test.tpl.php:29
4899
  msgid "OR"
4900
  msgstr ""
4901
 
4902
  #: tpl/toolbox/beta_test.tpl.php:39
4903
  msgid ""
 
 
 
 
 
4904
  "Press the %s button to use the most recent GitHub commit. Master is for "
4905
  "release candidate & Dev is for experimental testing."
4906
  msgstr ""
4907
 
4908
- #: tpl/toolbox/beta_test.tpl.php:39
4909
  msgid "Use latest GitHub Dev/Master commit"
4910
  msgstr ""
4911
 
4912
- #: tpl/toolbox/beta_test.tpl.php:40
4913
  msgid ""
4914
  "Press the %s button to stop beta testing and go back to the current release "
4915
  "from the WordPress Plugin Directory."
4916
  msgstr ""
4917
 
4918
- #: tpl/toolbox/beta_test.tpl.php:43
4919
  msgid ""
4920
  "In order to avoid an upgrade error, you must be using %1$s or later before "
4921
  "you can upgrade to %2$s versions."
@@ -5148,87 +5180,91 @@ msgid "This will delete all generated critical CSS files"
5148
  msgstr ""
5149
 
5150
  #: tpl/toolbox/purge.tpl.php:80
5151
- msgid "This will delete all generated image LQIP placeholder files"
5152
  msgstr ""
5153
 
5154
  #: tpl/toolbox/purge.tpl.php:89
5155
- msgid "This will delete all cached Gravatar files"
5156
  msgstr ""
5157
 
5158
  #: tpl/toolbox/purge.tpl.php:98
 
 
 
 
5159
  msgid ""
5160
  "Purge the cache entries created by this plugin except for Critical CSS & "
5161
  "LQIP caches"
5162
  msgstr ""
5163
 
5164
- #: tpl/toolbox/purge.tpl.php:107
5165
  msgid "Empty Entire Cache"
5166
  msgstr ""
5167
 
5168
- #: tpl/toolbox/purge.tpl.php:108
5169
  msgid ""
5170
  "Clears all cache entries related to this site, <i>including other web "
5171
  "applications</i>."
5172
  msgstr ""
5173
 
5174
- #: tpl/toolbox/purge.tpl.php:109
5175
  msgid "This action should only be used if things are cached incorrectly."
5176
  msgstr ""
5177
 
5178
- #: tpl/toolbox/purge.tpl.php:113
5179
  msgid "This will clear EVERYTHING inside the cache."
5180
  msgstr ""
5181
 
5182
- #: tpl/toolbox/purge.tpl.php:114
5183
  msgid "This may cause heavy load on the server."
5184
  msgstr ""
5185
 
5186
- #: tpl/toolbox/purge.tpl.php:115
5187
  msgid "If only the WordPress site should be purged, use Purge All."
5188
  msgstr ""
5189
 
5190
- #: tpl/toolbox/purge.tpl.php:159
5191
  msgid "Purge By..."
5192
  msgstr ""
5193
 
5194
- #: tpl/toolbox/purge.tpl.php:161
5195
  msgid "Select below for \"Purge by\" options."
5196
  msgstr ""
5197
 
5198
- #: tpl/toolbox/purge.tpl.php:188
5199
  msgid "Category"
5200
  msgstr ""
5201
 
5202
- #: tpl/toolbox/purge.tpl.php:194
5203
  msgid "Post ID"
5204
  msgstr ""
5205
 
5206
- #: tpl/toolbox/purge.tpl.php:200
5207
  msgid "Tag"
5208
  msgstr ""
5209
 
5210
- #: tpl/toolbox/purge.tpl.php:212
5211
  msgid ""
5212
  "Purge pages by category name - e.g. %2$s should be used for the URL %1$s."
5213
  msgstr ""
5214
 
5215
- #: tpl/toolbox/purge.tpl.php:217
5216
  msgid "Purge pages by post ID."
5217
  msgstr ""
5218
 
5219
- #: tpl/toolbox/purge.tpl.php:221
5220
  msgid "Purge pages by tag name - e.g. %2$s should be used for the URL %1$s."
5221
  msgstr ""
5222
 
5223
- #: tpl/toolbox/purge.tpl.php:226
5224
  msgid "Purge pages by relative or full URL."
5225
  msgstr ""
5226
 
5227
- #: tpl/toolbox/purge.tpl.php:227
5228
  msgid "e.g. Use %s or %s."
5229
  msgstr ""
5230
 
5231
- #: tpl/toolbox/purge.tpl.php:240
5232
  msgid "Purge List"
5233
  msgstr ""
5234
 
2
  # This file is distributed under the same license as the LiteSpeed Cache package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: LiteSpeed Cache 4.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
+ "POT-Creation-Date: 2021-08-13 15:13:19+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
53
  msgid "CDN"
54
  msgstr ""
55
 
56
+ #: src/admin-display.cls.php:123 src/gui.cls.php:593
57
  #: tpl/dash/dashboard.tpl.php:55 tpl/dash/network_dash.tpl.php:27
58
  msgid "Image Optimization"
59
  msgstr ""
123
  msgid "OFF"
124
  msgstr ""
125
 
126
+ #: src/admin-display.cls.php:275 src/gui.cls.php:584
127
  msgid "Settings"
128
  msgstr ""
129
 
202
  #: src/admin-display.cls.php:1079 tpl/cache/settings-esi.tpl.php:95
203
  #: tpl/page_optm/settings_css.tpl.php:165
204
  #: tpl/page_optm/settings_html.tpl.php:85
205
+ #: tpl/page_optm/settings_media_exc.tpl.php:26
206
  #: tpl/page_optm/settings_tuning.tpl.php:35
207
  #: tpl/page_optm/settings_tuning.tpl.php:56
208
  #: tpl/page_optm/settings_tuning.tpl.php:143
278
  msgid "Failed to communicate with Cloudflare"
279
  msgstr ""
280
 
281
+ #: src/cloud.cls.php:358 src/cloud.cls.php:371 src/cloud.cls.php:406
282
+ #: src/cloud.cls.php:431 src/cloud.cls.php:550 src/cloud.cls.php:906
283
  msgid "Cloud Error"
284
  msgstr ""
285
 
286
+ #: src/cloud.cls.php:406
287
  msgid "No available Cloud Node."
288
  msgstr ""
289
 
290
+ #: src/cloud.cls.php:431
291
+ msgid "No available Cloud Node after checked server load."
292
+ msgstr ""
293
+
294
+ #: src/cloud.cls.php:550
295
  msgid "Please try after %1$s for service %2$s."
296
  msgstr ""
297
 
298
+ #: src/cloud.cls.php:633 src/cloud.cls.php:649
299
  msgid "Failed to request via WordPress"
300
  msgstr ""
301
 
302
+ #: src/cloud.cls.php:664
303
+ msgid "Redetected node"
304
+ msgstr ""
305
+
306
+ #: src/cloud.cls.php:672
307
  msgid ""
308
  "We are working hard to improve your online service experience. The service "
309
  "will be unavailable while we work. We apologize for any inconvenience."
310
  msgstr ""
311
 
312
+ #: src/cloud.cls.php:685 src/cloud.cls.php:693 src/cloud.cls.php:942
313
  msgid "Message from QUIC.cloud server"
314
  msgstr ""
315
 
316
+ #: src/cloud.cls.php:701
317
  msgid "Good news from QUIC.cloud server"
318
  msgstr ""
319
 
320
+ #: src/cloud.cls.php:710
321
  msgid "%1$s plugin version %2$s required for this action."
322
  msgstr ""
323
 
324
+ #: src/cloud.cls.php:753 src/cloud.cls.php:931
325
  msgid "Failed to communicate with QUIC.cloud server"
326
  msgstr ""
327
 
328
+ #: src/cloud.cls.php:761
329
  msgid ""
330
  "Site not recognized. Domain Key has been automatically removed. Please "
331
  "request a new one."
332
  msgstr ""
333
 
334
+ #: src/cloud.cls.php:762 src/error.cls.php:48
335
  msgid "Click here to set."
336
  msgstr ""
337
 
338
+ #: src/cloud.cls.php:950
339
  msgid ""
340
  "Applied for Domain Key successfully. Please wait for result. Domain Key will "
341
  "be automatically sent to your WordPress."
342
  msgstr ""
343
 
344
+ #: src/cloud.cls.php:1001
345
  msgid ""
346
  "Congratulations, your Domain Key has been approved! The setting has been "
347
  "updated accordingly."
348
  msgstr ""
349
 
350
+ #: src/cloud.cls.php:1072
351
  msgid "Domain Key hash mismatch"
352
  msgstr ""
353
 
354
+ #: src/cloud.cls.php:1183
355
  msgid "Sync credit allowance with Cloud Server successfully."
356
  msgstr ""
357
 
391
  msgid "Previously existed in blacklist"
392
  msgstr ""
393
 
394
+ #: src/css.cls.php:60 src/root.cls.php:128
395
+ msgid "Queue cleared successfully."
396
  msgstr ""
397
 
398
+ #: src/css.cls.php:554
399
  msgid "%1$s %2$s files left in queue"
400
  msgstr ""
401
 
402
+ #: src/css.cls.php:555
403
  msgid "Cancel"
404
  msgstr ""
405
 
406
+ #: src/data.cls.php:213
407
  msgid ""
408
  "The database has been upgrading in the background since %s. This message "
409
  "will disappear once upgrade is complete."
410
  msgstr ""
411
 
412
+ #: src/data.upgrade.func.php:83
413
  msgid ""
414
  "LiteSpeed Cache upgraded successfully. NOTE: Due to changes in this version, "
415
  "the settings %1$s and %2$s have been turned OFF. Please turn them back on "
417
  "errors."
418
  msgstr ""
419
 
420
+ #: src/data.upgrade.func.php:83 src/lang.cls.php:114
421
  msgid "JS Combine"
422
  msgstr ""
423
 
424
+ #: src/data.upgrade.func.php:83
425
  msgid "JS Defer"
426
  msgstr ""
427
 
428
+ #: src/data.upgrade.func.php:84
429
  msgid "Click here to settings"
430
  msgstr ""
431
 
534
  msgstr ""
535
 
536
  #: src/error.cls.php:52
537
+ msgid "You don't have enough daily quota left for current service today."
538
  msgstr ""
539
 
540
  #: src/error.cls.php:56
541
+ msgid "You don't have enough quota left for current service this month."
542
  msgstr ""
543
 
544
  #: src/error.cls.php:60
576
  msgstr ""
577
 
578
  #: src/error.cls.php:92
579
+ msgid "The current server is under heavy load."
580
+ msgstr ""
581
+
582
+ #: src/error.cls.php:96
583
+ msgid "Online node needs to be redetected."
584
+ msgstr ""
585
+
586
+ #: src/error.cls.php:100
587
  msgid "Credits are not enough to proceed the current request."
588
  msgstr ""
589
 
590
+ #: src/error.cls.php:104 src/error.cls.php:128
591
  msgid "%s file not writable."
592
  msgstr ""
593
 
594
+ #: src/error.cls.php:112
595
  msgid "Could not find %1$s in %2$s."
596
  msgstr ""
597
 
598
+ #: src/error.cls.php:116
599
  msgid "Invalid login cookie. Please check the %s file."
600
  msgstr ""
601
 
602
+ #: src/error.cls.php:120
603
  msgid "Failed to back up %s file, aborted changes."
604
  msgstr ""
605
 
606
+ #: src/error.cls.php:124
607
  msgid "%s file not readable."
608
  msgstr ""
609
 
610
+ #: src/error.cls.php:132
611
  msgid "Failed to get %s file contents."
612
  msgstr ""
613
 
614
+ #: src/error.cls.php:136
615
  msgid "Failed to create table %s! SQL: %s."
616
  msgstr ""
617
 
618
+ #: src/error.cls.php:140
619
  msgid "Crawler disabled by the server admin."
620
  msgstr ""
621
 
622
+ #: src/error.cls.php:145
623
  msgid "Previous request too recent. Please try again later."
624
  msgstr ""
625
 
626
+ #: src/error.cls.php:149
627
  msgid "Previous request too recent. Please try again after %s."
628
  msgstr ""
629
 
630
+ #: src/error.cls.php:153
631
  msgid "Your application is waiting for approval."
632
  msgstr ""
633
 
634
+ #: src/error.cls.php:157
635
  msgid "The callback validation to your domain failed due to hash mismatch."
636
  msgstr ""
637
 
638
+ #: src/error.cls.php:161
639
  msgid ""
640
  "The callback validation to your domain failed. Please make sure there is no "
641
  "firewall blocking our servers."
642
  msgstr ""
643
 
644
+ #: src/error.cls.php:165
645
  msgid ""
646
  "The callback validation to your domain failed. Please make sure there is no "
647
  "firewall blocking our servers. Response code: "
648
  msgstr ""
649
 
650
+ #: src/error.cls.php:169
651
  msgid ""
652
  "Your domain has been forbidden from using our services due to a previous "
653
  "policy violation."
654
  msgstr ""
655
 
656
+ #: src/error.cls.php:173
657
  msgid "Unknown error"
658
  msgstr ""
659
 
660
+ #: src/file.cls.php:136
661
  msgid "Folder does not exist: %s"
662
  msgstr ""
663
 
664
+ #: src/file.cls.php:145
665
  msgid "Can not create folder: %1$s. Error: %2$s"
666
  msgstr ""
667
 
668
+ #: src/file.cls.php:153
669
  msgid "Folder is not writable: %s."
670
  msgstr ""
671
 
672
+ #: src/file.cls.php:160 src/file.cls.php:165
673
  msgid "File %s is not writable."
674
  msgstr ""
675
 
676
+ #: src/file.cls.php:172
677
  msgid "Failed to write to %s."
678
  msgstr ""
679
 
723
 
724
  #: src/gui.cls.php:461 src/gui.cls.php:469 src/gui.cls.php:477
725
  #: src/gui.cls.php:486 src/gui.cls.php:496 src/gui.cls.php:506
726
+ #: src/gui.cls.php:516 src/gui.cls.php:526 src/gui.cls.php:536
727
+ #: src/gui.cls.php:602 src/gui.cls.php:610 src/gui.cls.php:618
728
  #: src/gui.cls.php:627 src/gui.cls.php:637 src/gui.cls.php:647
729
+ #: src/gui.cls.php:657 src/gui.cls.php:667 src/gui.cls.php:677
730
+ #: src/gui.cls.php:687 tpl/page_optm/settings_media.tpl.php:125
731
+ #: tpl/toolbox/purge.tpl.php:37 tpl/toolbox/purge.tpl.php:43
732
+ #: tpl/toolbox/purge.tpl.php:52 tpl/toolbox/purge.tpl.php:61
733
+ #: tpl/toolbox/purge.tpl.php:70 tpl/toolbox/purge.tpl.php:79
734
+ #: tpl/toolbox/purge.tpl.php:88 tpl/toolbox/purge.tpl.php:97
735
+ #: tpl/toolbox/purge.tpl.php:106
736
  msgid "Purge All"
737
  msgstr ""
738
 
739
+ #: src/gui.cls.php:469 src/gui.cls.php:560 src/gui.cls.php:610
740
  msgid "LSCache"
741
  msgstr ""
742
 
743
+ #: src/gui.cls.php:477 src/gui.cls.php:618 tpl/toolbox/purge.tpl.php:43
744
  msgid "CSS/JS Cache"
745
  msgstr ""
746
 
747
+ #: src/gui.cls.php:486 src/gui.cls.php:637 src/lang.cls.php:82
748
+ #: tpl/dash/dashboard.tpl.php:396 tpl/toolbox/purge.tpl.php:52
749
  msgid "Object Cache"
750
  msgstr ""
751
 
752
+ #: src/gui.cls.php:496 src/gui.cls.php:647 tpl/toolbox/purge.tpl.php:61
753
  msgid "Opcode Cache"
754
  msgstr ""
755
 
756
+ #: src/gui.cls.php:526 src/gui.cls.php:677
757
+ #: tpl/page_optm/settings_media.tpl.php:125 tpl/toolbox/purge.tpl.php:88
758
  msgid "LQIP Cache"
759
  msgstr ""
760
 
761
+ #: src/gui.cls.php:536 src/gui.cls.php:687 src/lang.cls.php:142
762
+ #: tpl/toolbox/purge.tpl.php:97
763
  msgid "Gravatar Cache"
764
  msgstr ""
765
 
766
+ #: src/gui.cls.php:560
767
  msgid "LiteSpeed Cache Purge All"
768
  msgstr ""
769
 
770
+ #: src/gui.cls.php:576 tpl/cdn/entry.tpl.php:7 tpl/cdn/settings.tpl.php:194
771
  #: tpl/db_optm/entry.tpl.php:6
772
  msgid "Manage"
773
  msgstr ""
774
 
775
+ #: src/gui.cls.php:627 tpl/cdn/manage.tpl.php:17
776
  msgid "Cloudflare"
777
  msgstr ""
778
 
779
+ #: src/gui.cls.php:706 tpl/img_optm/summary.tpl.php:175
780
  msgid "Remove all previous unfinished image optimization requests."
781
  msgstr ""
782
 
783
+ #: src/gui.cls.php:707 tpl/img_optm/summary.tpl.php:177
784
  msgid "Clean Up Unfinished Data"
785
  msgstr ""
786
 
787
+ #: src/gui.cls.php:725
788
  msgid "Install %s"
789
  msgstr ""
790
 
791
+ #: src/gui.cls.php:726
792
  msgid "Install Now"
793
  msgstr ""
794
 
795
+ #: src/gui.cls.php:745
796
  msgid ""
797
  "<a href=\"%1$s\" %2$s>View version %3$s details</a> or <a href=\"%4$s\" %5$s "
798
  "target=\"_blank\">update now</a>."
799
  msgstr ""
800
 
801
+ #: src/gui.cls.php:748
802
  msgid "View %1$s version %2$s details"
803
  msgstr ""
804
 
805
+ #: src/gui.cls.php:753
806
  msgid "Update %s now"
807
  msgstr ""
808
 
936
  msgid "Images not requested"
937
  msgstr ""
938
 
939
+ #: src/lang.cls.php:24 tpl/dash/dashboard.tpl.php:337
940
  msgid "Images requested"
941
  msgstr ""
942
 
943
+ #: src/lang.cls.php:25 tpl/dash/dashboard.tpl.php:347
944
  msgid "Images notified to pull"
945
  msgstr ""
946
 
996
  msgid "Enable Cache"
997
  msgstr ""
998
 
999
+ #: src/lang.cls.php:59 tpl/dash/dashboard.tpl.php:397
1000
  msgid "Browser Cache"
1001
  msgstr ""
1002
 
1750
  msgid "LQIP image preview for size %s"
1751
  msgstr ""
1752
 
1753
+ #: src/purge.cls.php:181
 
 
 
 
1754
  msgid "Purged all caches successfully."
1755
  msgstr ""
1756
 
1757
+ #: src/purge.cls.php:200
1758
  msgid "Notified LiteSpeed Web Server to purge all LSCache entries."
1759
  msgstr ""
1760
 
1761
+ #: src/purge.cls.php:219
1762
  msgid "Cleaned all Critical CSS files."
1763
  msgstr ""
1764
 
1765
+ #: src/purge.cls.php:238
1766
+ msgid "Cleaned all Unique CSS files."
1767
+ msgstr ""
1768
+
1769
+ #: src/purge.cls.php:255
1770
  msgid "Cleaned all LQIP files."
1771
  msgstr ""
1772
 
1773
+ #: src/purge.cls.php:272
1774
  msgid "Cleaned all Gravatar files."
1775
  msgstr ""
1776
 
1777
+ #: src/purge.cls.php:302
1778
  msgid "Notified LiteSpeed Web Server to purge CSS/JS entries."
1779
  msgstr ""
1780
 
1781
+ #: src/purge.cls.php:318
1782
  msgid "Opcode cache is not enabled."
1783
  msgstr ""
1784
 
1785
+ #: src/purge.cls.php:330
1786
  msgid "Reset the entire opcode cache successfully."
1787
  msgstr ""
1788
 
1789
+ #: src/purge.cls.php:358
1790
  msgid "Object cache is not enabled."
1791
  msgstr ""
1792
 
1793
+ #: src/purge.cls.php:371
1794
  msgid "Purge all object caches successfully."
1795
  msgstr ""
1796
 
1797
+ #: src/purge.cls.php:554
1798
  msgid "Notified LiteSpeed Web Server to purge the front page."
1799
  msgstr ""
1800
 
1801
+ #: src/purge.cls.php:567
1802
  msgid "Notified LiteSpeed Web Server to purge all pages."
1803
  msgstr ""
1804
 
1805
+ #: src/purge.cls.php:586
1806
  msgid "Notified LiteSpeed Web Server to purge error pages."
1807
  msgstr ""
1808
 
1809
+ #: src/purge.cls.php:613
1810
  msgid "Purge category %s"
1811
  msgstr ""
1812
 
1813
+ #: src/purge.cls.php:640
1814
  msgid "Purge tag %s"
1815
  msgstr ""
1816
 
1817
+ #: src/purge.cls.php:671
1818
  msgid "Purge url %s"
1819
  msgstr ""
1820
 
1970
  msgid "Dismiss this notice"
1971
  msgstr ""
1972
 
1973
+ #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 4.3) #-#-#-#-#
1974
  #. Plugin Name of the plugin/theme
1975
  #: tpl/banner/new_version.php:59 tpl/banner/new_version_dev.tpl.php:12
1976
  #: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:8
1986
  msgstr ""
1987
 
1988
  #: tpl/banner/new_version.php:71 tpl/banner/new_version_dev.tpl.php:24
1989
+ #: tpl/toolbox/beta_test.tpl.php:52
1990
  msgid "Upgrade"
1991
  msgstr ""
1992
 
2010
  msgid "Thank You for Using the LiteSpeed Cache Plugin!"
2011
  msgstr ""
2012
 
2013
+ #: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:178
2014
  msgid "Page Load Time"
2015
  msgstr ""
2016
 
2017
  #: tpl/banner/score.php:34 tpl/banner/score.php:74
2018
+ #: tpl/dash/dashboard.tpl.php:191 tpl/dash/dashboard.tpl.php:259
2019
  msgid "Before"
2020
  msgstr ""
2021
 
2022
  #: tpl/banner/score.php:45 tpl/banner/score.php:84
2023
+ #: tpl/dash/dashboard.tpl.php:200 tpl/dash/dashboard.tpl.php:267
2024
  msgid "After"
2025
  msgstr ""
2026
 
2027
  #: tpl/banner/score.php:55 tpl/banner/score.php:94
2028
+ #: tpl/dash/dashboard.tpl.php:208 tpl/dash/dashboard.tpl.php:275
2029
  msgid "Improved by"
2030
  msgstr ""
2031
 
2032
+ #: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:235
2033
  msgid "PageSpeed Score"
2034
  msgstr ""
2035
 
2074
  msgstr ""
2075
 
2076
  #: tpl/cache/entry.tpl.php:8 tpl/cache/entry_network.tpl.php:7
2077
+ #: tpl/toolbox/entry.tpl.php:6 tpl/toolbox/purge.tpl.php:133
2078
  msgid "Purge"
2079
  msgstr ""
2080
 
2328
  msgstr ""
2329
 
2330
  #: tpl/cache/settings-esi.tpl.php:96
2331
+ #: tpl/page_optm/settings_media_exc.tpl.php:27
2332
  #: tpl/page_optm/settings_tuning.tpl.php:36
2333
  #: tpl/page_optm/settings_tuning.tpl.php:57
2334
  #: tpl/page_optm/settings_tuning.tpl.php:144
3023
  msgstr ""
3024
 
3025
  #: tpl/crawler/blacklist.tpl.php:31 tpl/crawler/map.tpl.php:43
3026
+ #: tpl/toolbox/purge.tpl.php:215
3027
  msgid "URL"
3028
  msgstr ""
3029
 
3094
  msgid "Sitemap Total"
3095
  msgstr ""
3096
 
3097
+ #: tpl/crawler/map.tpl.php:44 tpl/dash/dashboard.tpl.php:529
3098
  msgid "Crawler Status"
3099
  msgstr ""
3100
 
3267
  msgid "Run time for previous crawler"
3268
  msgstr ""
3269
 
3270
+ #: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:542
3271
  msgid "Current crawler started at"
3272
  msgstr ""
3273
 
3274
+ #: tpl/crawler/summary.tpl.php:92 tpl/dash/dashboard.tpl.php:549
3275
  msgid "Last interval"
3276
  msgstr ""
3277
 
3278
+ #: tpl/crawler/summary.tpl.php:99 tpl/dash/dashboard.tpl.php:556
3279
  msgid "Ended reason"
3280
  msgstr ""
3281
 
3282
+ #: tpl/crawler/summary.tpl.php:106 tpl/dash/dashboard.tpl.php:563
3283
  msgid "<b>Last crawled:</b> %s item(s)"
3284
  msgstr ""
3285
 
3375
  msgid "CDN Bandwidth"
3376
  msgstr ""
3377
 
3378
+ #: tpl/dash/dashboard.tpl.php:58 tpl/dash/dashboard.tpl.php:497
3379
  msgid "Low Quality Image Placeholder"
3380
  msgstr ""
3381
 
3387
  msgid "Usage"
3388
  msgstr ""
3389
 
3390
+ #: tpl/dash/dashboard.tpl.php:128 tpl/dash/network_dash.tpl.php:90
3391
  msgid "PAYG Balance"
3392
  msgstr ""
3393
 
3394
+ #: tpl/dash/dashboard.tpl.php:129 tpl/dash/network_dash.tpl.php:91
3395
  msgid "This Month Usage"
3396
  msgstr ""
3397
 
3398
+ #: tpl/dash/dashboard.tpl.php:131 tpl/dash/network_dash.tpl.php:93
3399
  msgid "Pay as You Go Usage Statistics"
3400
  msgstr ""
3401
 
3402
+ #: tpl/dash/dashboard.tpl.php:150 tpl/dash/network_dash.tpl.php:100
3403
  msgid "Total Usage"
3404
  msgstr ""
3405
 
3406
+ #: tpl/dash/dashboard.tpl.php:151 tpl/dash/network_dash.tpl.php:101
3407
  msgid "Total images optimized in this month"
3408
  msgstr ""
3409
 
3410
+ #: tpl/dash/dashboard.tpl.php:160
3411
+ msgid "Remaining Daily Quota"
3412
+ msgstr ""
3413
+
3414
+ #: tpl/dash/dashboard.tpl.php:169
3415
  msgid "Go to QUIC.cloud dashboard"
3416
  msgstr ""
3417
 
3418
+ #: tpl/dash/dashboard.tpl.php:181
3419
  msgid "Refresh page load time"
3420
  msgstr ""
3421
 
3422
+ #: tpl/dash/dashboard.tpl.php:222 tpl/dash/dashboard.tpl.php:291
3423
+ #: tpl/dash/dashboard.tpl.php:456 tpl/dash/dashboard.tpl.php:489
3424
+ #: tpl/dash/dashboard.tpl.php:521
3425
  msgid "Last requested"
3426
  msgstr ""
3427
 
3428
+ #: tpl/dash/dashboard.tpl.php:227
3429
  msgid "Current closest Cloud server is %s.&#10;Click to redetect."
3430
  msgstr ""
3431
 
3432
+ #: tpl/dash/dashboard.tpl.php:227 tpl/img_optm/summary.tpl.php:57
3433
  #: tpl/page_optm/settings_css.tpl.php:83 tpl/page_optm/settings_css.tpl.php:184
3434
  #: tpl/page_optm/settings_media.tpl.php:176
3435
  msgid ""
3436
  "Are you sure you want to redetect the closest cloud server for this service?"
3437
  msgstr ""
3438
 
3439
+ #: tpl/dash/dashboard.tpl.php:238
3440
  msgid "Refresh page score"
3441
  msgstr ""
3442
 
3443
+ #: tpl/dash/dashboard.tpl.php:299 tpl/img_optm/entry.tpl.php:6
3444
  msgid "Image Optimization Summary"
3445
  msgstr ""
3446
 
3447
+ #: tpl/dash/dashboard.tpl.php:300 tpl/dash/dashboard.tpl.php:389
3448
+ #: tpl/dash/dashboard.tpl.php:432 tpl/dash/dashboard.tpl.php:465
3449
+ #: tpl/dash/dashboard.tpl.php:498 tpl/dash/dashboard.tpl.php:530
3450
  msgid "More"
3451
  msgstr ""
3452
 
3453
+ #: tpl/dash/dashboard.tpl.php:310
3454
  msgid "Image Groups Prepared"
3455
  msgstr ""
3456
 
3457
+ #: tpl/dash/dashboard.tpl.php:325
3458
  msgid "Images Requested"
3459
  msgstr ""
3460
 
3461
+ #: tpl/dash/dashboard.tpl.php:357 tpl/img_optm/summary.tpl.php:342
3462
  msgid "Last Request"
3463
  msgstr ""
3464
 
3465
+ #: tpl/dash/dashboard.tpl.php:360
3466
  msgid "Last Pull"
3467
  msgstr ""
3468
 
3469
+ #: tpl/dash/dashboard.tpl.php:388
3470
  msgid "Cache Status"
3471
  msgstr ""
3472
 
3473
+ #: tpl/dash/dashboard.tpl.php:394
3474
  msgid "Public Cache"
3475
  msgstr ""
3476
 
3477
+ #: tpl/dash/dashboard.tpl.php:395
3478
  msgid "Private Cache"
3479
  msgstr ""
3480
 
3481
+ #: tpl/dash/dashboard.tpl.php:417
3482
  msgid "Cache Stats"
3483
  msgstr ""
3484
 
3485
+ #: tpl/dash/dashboard.tpl.php:431 tpl/toolbox/purge.tpl.php:70
3486
  msgid "Critical CSS"
3487
  msgstr ""
3488
 
3489
+ #: tpl/dash/dashboard.tpl.php:437 tpl/dash/dashboard.tpl.php:470
3490
+ #: tpl/dash/dashboard.tpl.php:503 tpl/page_optm/settings_css.tpl.php:74
3491
  #: tpl/page_optm/settings_css.tpl.php:175
3492
  #: tpl/page_optm/settings_media.tpl.php:170
3493
  msgid "Last generated"
3494
  msgstr ""
3495
 
3496
+ #: tpl/dash/dashboard.tpl.php:440 tpl/dash/dashboard.tpl.php:473
3497
+ #: tpl/dash/dashboard.tpl.php:506
3498
  msgid "Time to execute previous request"
3499
  msgstr ""
3500
 
3501
+ #: tpl/dash/dashboard.tpl.php:445 tpl/dash/dashboard.tpl.php:478
3502
+ #: tpl/dash/dashboard.tpl.php:511
3503
  msgid "Requests in queue"
3504
  msgstr ""
3505
 
3506
+ #: tpl/dash/dashboard.tpl.php:448 tpl/dash/dashboard.tpl.php:481
3507
+ #: tpl/dash/dashboard.tpl.php:513
3508
  msgid "Force cron"
3509
  msgstr ""
3510
 
3511
+ #: tpl/dash/dashboard.tpl.php:464 tpl/toolbox/purge.tpl.php:79
3512
  msgid "Unique CSS"
3513
  msgstr ""
3514
 
3515
+ #: tpl/dash/dashboard.tpl.php:534
3516
  msgid "Crawler(s)"
3517
  msgstr ""
3518
 
3519
+ #: tpl/dash/dashboard.tpl.php:537
3520
  msgid "Currently active crawler"
3521
  msgstr ""
3522
 
4399
 
4400
  #: tpl/page_optm/settings_css.tpl.php:67
4401
  msgid ""
4402
+ "Automatic generation of unique CSS is in the background via a cron-based "
4403
  "queue."
4404
  msgstr ""
4405
 
4598
 
4599
  #: tpl/page_optm/settings_js.tpl.php:78
4600
  msgid ""
4601
+ "Deferring until page is parsed or delaying till interaction can help reduce "
4602
+ "resource contention and improve performance causing a lower FID (Core Web "
4603
+ "Vitals metric)."
4604
  msgstr ""
4605
 
4606
  #: tpl/page_optm/settings_localization.tpl.php:12
4781
  msgid "Listed images will not be lazy loaded."
4782
  msgstr ""
4783
 
4784
+ #: tpl/page_optm/settings_media_exc.tpl.php:24
4785
+ msgid ""
4786
+ "Useful for above-the-fold images causing CLS (a Core Web Vitals metric)."
4787
+ msgstr ""
4788
+
4789
+ #: tpl/page_optm/settings_media_exc.tpl.php:28
4790
  #: tpl/page_optm/settings_tuning.tpl.php:37
4791
  #: tpl/page_optm/settings_tuning.tpl.php:58
4792
  #: tpl/page_optm/settings_tuning.tpl.php:145
4794
  msgid "Elements with attribute %s in html code will be excluded."
4795
  msgstr ""
4796
 
4797
+ #: tpl/page_optm/settings_media_exc.tpl.php:50
4798
  msgid "Images containing these class names will not be lazy loaded."
4799
  msgstr ""
4800
 
4801
+ #: tpl/page_optm/settings_media_exc.tpl.php:65
4802
  msgid "Images having these parent class names will not be lazy loaded."
4803
  msgstr ""
4804
 
4805
+ #: tpl/page_optm/settings_media_exc.tpl.php:79
4806
  msgid "Iframes containing these class names will not be lazy loaded."
4807
  msgstr ""
4808
 
4809
+ #: tpl/page_optm/settings_media_exc.tpl.php:94
4810
  msgid "Iframes having these parent class names will not be lazy loaded."
4811
  msgstr ""
4812
 
4813
+ #: tpl/page_optm/settings_media_exc.tpl.php:108
4814
  msgid "Prevent any lazy load of listed pages."
4815
  msgstr ""
4816
 
4817
+ #: tpl/page_optm/settings_media_exc.tpl.php:122
4818
  msgid "These images will not generate LQIP."
4819
  msgstr ""
4820
 
4896
  msgid "Selected roles will be excluded from all optimizations."
4897
  msgstr ""
4898
 
4899
+ #: tpl/toolbox/beta_test.tpl.php:15
4900
  msgid "Try GitHub Version"
4901
  msgstr ""
4902
 
4903
+ #: tpl/toolbox/beta_test.tpl.php:19
4904
  msgid ""
4905
  "Use this section to switch plugin versions. To beta test a GitHub commit, "
4906
  "enter the commit URL in the field below."
4907
  msgstr ""
4908
 
4909
+ #: tpl/toolbox/beta_test.tpl.php:20
4910
  msgid "Example"
4911
  msgstr ""
4912
 
4913
+ #: tpl/toolbox/beta_test.tpl.php:24
4914
  msgid "Use latest GitHub Dev commit"
4915
  msgstr ""
4916
 
4917
+ #: tpl/toolbox/beta_test.tpl.php:26
4918
  msgid "Use latest GitHub Master commit"
4919
  msgstr ""
4920
 
4921
+ #: tpl/toolbox/beta_test.tpl.php:28 tpl/toolbox/beta_test.tpl.php:44
4922
  msgid "Use latest WordPress release version"
4923
  msgstr ""
4924
 
4925
+ #: tpl/toolbox/beta_test.tpl.php:28
4926
  msgid "OR"
4927
  msgstr ""
4928
 
4929
  #: tpl/toolbox/beta_test.tpl.php:39
4930
  msgid ""
4931
+ "Downgrade not recommended. May cause fatal error due to refactored code."
4932
+ msgstr ""
4933
+
4934
+ #: tpl/toolbox/beta_test.tpl.php:43
4935
+ msgid ""
4936
  "Press the %s button to use the most recent GitHub commit. Master is for "
4937
  "release candidate & Dev is for experimental testing."
4938
  msgstr ""
4939
 
4940
+ #: tpl/toolbox/beta_test.tpl.php:43
4941
  msgid "Use latest GitHub Dev/Master commit"
4942
  msgstr ""
4943
 
4944
+ #: tpl/toolbox/beta_test.tpl.php:44
4945
  msgid ""
4946
  "Press the %s button to stop beta testing and go back to the current release "
4947
  "from the WordPress Plugin Directory."
4948
  msgstr ""
4949
 
4950
+ #: tpl/toolbox/beta_test.tpl.php:49
4951
  msgid ""
4952
  "In order to avoid an upgrade error, you must be using %1$s or later before "
4953
  "you can upgrade to %2$s versions."
5180
  msgstr ""
5181
 
5182
  #: tpl/toolbox/purge.tpl.php:80
5183
+ msgid "This will delete all generated unique CSS files"
5184
  msgstr ""
5185
 
5186
  #: tpl/toolbox/purge.tpl.php:89
5187
+ msgid "This will delete all generated image LQIP placeholder files"
5188
  msgstr ""
5189
 
5190
  #: tpl/toolbox/purge.tpl.php:98
5191
+ msgid "This will delete all cached Gravatar files"
5192
+ msgstr ""
5193
+
5194
+ #: tpl/toolbox/purge.tpl.php:107
5195
  msgid ""
5196
  "Purge the cache entries created by this plugin except for Critical CSS & "
5197
  "LQIP caches"
5198
  msgstr ""
5199
 
5200
+ #: tpl/toolbox/purge.tpl.php:116
5201
  msgid "Empty Entire Cache"
5202
  msgstr ""
5203
 
5204
+ #: tpl/toolbox/purge.tpl.php:117
5205
  msgid ""
5206
  "Clears all cache entries related to this site, <i>including other web "
5207
  "applications</i>."
5208
  msgstr ""
5209
 
5210
+ #: tpl/toolbox/purge.tpl.php:118
5211
  msgid "This action should only be used if things are cached incorrectly."
5212
  msgstr ""
5213
 
5214
+ #: tpl/toolbox/purge.tpl.php:122
5215
  msgid "This will clear EVERYTHING inside the cache."
5216
  msgstr ""
5217
 
5218
+ #: tpl/toolbox/purge.tpl.php:123
5219
  msgid "This may cause heavy load on the server."
5220
  msgstr ""
5221
 
5222
+ #: tpl/toolbox/purge.tpl.php:124
5223
  msgid "If only the WordPress site should be purged, use Purge All."
5224
  msgstr ""
5225
 
5226
+ #: tpl/toolbox/purge.tpl.php:168
5227
  msgid "Purge By..."
5228
  msgstr ""
5229
 
5230
+ #: tpl/toolbox/purge.tpl.php:170
5231
  msgid "Select below for \"Purge by\" options."
5232
  msgstr ""
5233
 
5234
+ #: tpl/toolbox/purge.tpl.php:197
5235
  msgid "Category"
5236
  msgstr ""
5237
 
5238
+ #: tpl/toolbox/purge.tpl.php:203
5239
  msgid "Post ID"
5240
  msgstr ""
5241
 
5242
+ #: tpl/toolbox/purge.tpl.php:209
5243
  msgid "Tag"
5244
  msgstr ""
5245
 
5246
+ #: tpl/toolbox/purge.tpl.php:221
5247
  msgid ""
5248
  "Purge pages by category name - e.g. %2$s should be used for the URL %1$s."
5249
  msgstr ""
5250
 
5251
+ #: tpl/toolbox/purge.tpl.php:226
5252
  msgid "Purge pages by post ID."
5253
  msgstr ""
5254
 
5255
+ #: tpl/toolbox/purge.tpl.php:230
5256
  msgid "Purge pages by tag name - e.g. %2$s should be used for the URL %1$s."
5257
  msgstr ""
5258
 
5259
+ #: tpl/toolbox/purge.tpl.php:235
5260
  msgid "Purge pages by relative or full URL."
5261
  msgstr ""
5262
 
5263
+ #: tpl/toolbox/purge.tpl.php:236
5264
  msgid "e.g. Use %s or %s."
5265
  msgstr ""
5266
 
5267
+ #: tpl/toolbox/purge.tpl.php:249
5268
  msgid "Purge List"
5269
  msgstr ""
5270
 
litespeed-cache.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: LiteSpeed Cache
4
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
5
  * Description: High-performance page caching and site optimization from LiteSpeed
6
- * Version: 4.2
7
  * Author: LiteSpeed Technologies
8
  * Author URI: https://www.litespeedtech.com
9
  * License: GPLv3
@@ -33,7 +33,7 @@ if ( defined( 'LSCWP_V' ) ) {
33
  return;
34
  }
35
 
36
- ! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '4.2' );
37
 
38
  ! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
39
  ! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
3
  * Plugin Name: LiteSpeed Cache
4
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
5
  * Description: High-performance page caching and site optimization from LiteSpeed
6
+ * Version: 4.3
7
  * Author: LiteSpeed Technologies
8
  * Author URI: https://www.litespeedtech.com
9
  * License: GPLv3
33
  return;
34
  }
35
 
36
+ ! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '4.3' );
37
 
38
  ! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
39
  ! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: LiteSpeedTech
3
  Tags: caching, optimize, performance, pagespeed, core web vitals, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
4
  Requires at least: 4.0
5
  Tested up to: 5.7.2
6
- Stable tag: 4.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -30,13 +30,14 @@ LiteSpeed Cache for WordPress is compatible with ClassicPress.
30
  * Object Cache (Memcached/LSMCD/Redis) Support<sup>+</sup>
31
  * Image Optimization (Lossless/Lossy)
32
  * Minify CSS, JavaScript, and HTML
33
- * Minify inline CSS/JS
34
  * Combine CSS/JS
35
  * Automatically generate Critical CSS
36
- * Lazyload images/iframes
37
  * Responsive Image Placeholders
38
  * Multiple CDN Support<sup>+</sup>
39
- * Load CSS/JS Asynchronously
 
40
  * Browser Cache Support<sup>+</sup>
41
  * Database Cleaner and Optimizer
42
  * PageSpeed score (including Core Web Vitals) optimization
@@ -69,7 +70,7 @@ LiteSpeed Cache for WordPress is compatible with ClassicPress.
69
  * HTTP/2 support
70
  * [HTTP/3 & QUIC](https://www.litespeedtech.com/http3-faq) support
71
  * ESI (Edge Side Includes) support<sup>*</sup>
72
- * Widgets and Shortcodes as ESI blocks<sup>*</sup>
73
 
74
  <sup>*</sup> Feature not available in OpenLiteSpeed
75
 
@@ -91,8 +92,8 @@ LiteSpeed Cache for WordPress is compatible with ClassicPress.
91
  * [Join our Slack community](https://litespeedtech.com/slack) to connect with other LiteSpeed users.
92
  * [Ask a question on our support forum](https://wordpress.org/support/plugin/litespeed-cache/).
93
  * [View detailed documentation](https://docs.litespeedtech.com/lscache/lscwp/overview/).
94
- * [Read WordPress Wednesday tutorials on our blog](https://blog.litespeedtech.com/tag/wordpress-wednesday).
95
- * [Help translate LSCWP](https://translate.wordpress.org/projects/wp-plugins/litespeed-cache).
96
  * [LSCWP GitHub repo](https://github.com/litespeedtech/lscache_wp).
97
 
98
  == Installation ==
@@ -145,7 +146,7 @@ A page cache allows the server to bypass PHP and database queries altogether. LS
145
 
146
  If all of that sounds complicated, no need to worry. LSCWP works right out of the box with default settings that are appropriate for most sites. [See the Beginner's Guide](https://docs.litespeedtech.com/lscache/lscwp/beginner/).
147
 
148
- **Don't have a LiteSpeed server?** Try our QUIC.cloud CDN service. It allows sites on *any server* (nginx and Apache included) to experience the power of LiteSpeed caching! [Click here](https://quic.cloud) to learn more or to give QUIC.cloud a try.
149
 
150
  = What about the optimization features of LSCache? =
151
 
@@ -248,6 +249,24 @@ The vast majority of plugins and themes are compatible with LiteSpeed Cache. The
248
 
249
  == Changelog ==
250
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  = 4.2 - Jul 29 2021 =
252
  * **Cloud** Auto redirect to a new node if the current node is not available anymore.
253
  * **Cloud** Combined CCSS/UCSS to sub services of Page Optimization.
3
  Tags: caching, optimize, performance, pagespeed, core web vitals, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
4
  Requires at least: 4.0
5
  Tested up to: 5.7.2
6
+ Stable tag: 4.3
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
30
  * Object Cache (Memcached/LSMCD/Redis) Support<sup>+</sup>
31
  * Image Optimization (Lossless/Lossy)
32
  * Minify CSS, JavaScript, and HTML
33
+ * Minify inline & external CSS/JS
34
  * Combine CSS/JS
35
  * Automatically generate Critical CSS
36
+ * Lazy-load images/iframes
37
  * Responsive Image Placeholders
38
  * Multiple CDN Support<sup>+</sup>
39
+ * Load CSS Asynchronously
40
+ * Defer/delay JS loading
41
  * Browser Cache Support<sup>+</sup>
42
  * Database Cleaner and Optimizer
43
  * PageSpeed score (including Core Web Vitals) optimization
70
  * HTTP/2 support
71
  * [HTTP/3 & QUIC](https://www.litespeedtech.com/http3-faq) support
72
  * ESI (Edge Side Includes) support<sup>*</sup>
73
+ * Widgets and Shortcodes as ESI blocks<sup>*</sup> (requires Classic Widgets plugin with WP 5.8 currently)
74
 
75
  <sup>*</sup> Feature not available in OpenLiteSpeed
76
 
92
  * [Join our Slack community](https://litespeedtech.com/slack) to connect with other LiteSpeed users.
93
  * [Ask a question on our support forum](https://wordpress.org/support/plugin/litespeed-cache/).
94
  * [View detailed documentation](https://docs.litespeedtech.com/lscache/lscwp/overview/).
95
+ * [Read WordPress Wednesday tutorials on our blog](https://blog.litespeedtech.com/tag/wordpress-wednesday/).
96
+ * [Help translate LSCWP](https://translate.wordpress.org/projects/wp-plugins/litespeed-cache/).
97
  * [LSCWP GitHub repo](https://github.com/litespeedtech/lscache_wp).
98
 
99
  == Installation ==
146
 
147
  If all of that sounds complicated, no need to worry. LSCWP works right out of the box with default settings that are appropriate for most sites. [See the Beginner's Guide](https://docs.litespeedtech.com/lscache/lscwp/beginner/).
148
 
149
+ **Don't have a LiteSpeed server?** Try our QUIC.cloud CDN service. It allows sites on *any server* (NGINX and Apache included) to experience the power of LiteSpeed caching! [Click here](https://quic.cloud) to learn more or to give QUIC.cloud a try.
150
 
151
  = What about the optimization features of LSCache? =
152
 
249
 
250
  == Changelog ==
251
 
252
+ = 4.3 - Aug 16 2021 =
253
+ * **UCSS** Separated UCSS Purge from CCSS Purge. (⭐ Contributed by Alice Tang #PR388)
254
+ * 🐞**Cloud** Fixed an issue where CCSS/UCSS quota data failed to update locally.
255
+ * **Cloud** Added server load as a factor when detecting node availability.
256
+ * **Cloud** Improved the speed of checking daily quota and showing the related error message.
257
+ * **Cloud** Added ability to re-detect node availability if the current node is responding w/ a heavy load code.
258
+ * **Cloud** CCSS/UCSS/LQIP queue now exits immediately when quota is depleted.
259
+ * **Cloud** Replaced separate `d/regionnodes` with a single `d/nodes` in the node list API for image optimization.
260
+ * **LQIP** Fixed an issue with LQIP network compatibility. (⭐ Contributed by Alice Tang #PR387)
261
+ * **GUEST** JS no longer preloads for Guest Optimization. (@Ankit)
262
+ * 🐞**Data** Fixed an issue where deleting the `cssjs` data folder causes a failure in the upgrade process. (@Joshua #PR391)
263
+ * **GUI** Fixed a potential dashboard PHP warning when no queue existed. (@jrmora)
264
+ * **GUI** Added daily quota on dashboard.
265
+ * **GUI** Added downgrade warning to Toolbox -> Beta Test.
266
+ * **GUI** Tuned `.litespeed-desc` class to full width in CSS.
267
+ * **Conf** `Preserve EXIF/XMP data` now defaults to ON due to copyright concerns. (@Tobolo)
268
+ * 🐞**3rd** Fixed a PHP warning when using Google AMP w/ /amp as structure. (@thanhstran98)
269
+
270
  = 4.2 - Jul 29 2021 =
271
  * **Cloud** Auto redirect to a new node if the current node is not available anymore.
272
  * **Cloud** Combined CCSS/UCSS to sub services of Page Optimization.
src/avatar.cls.php CHANGED
@@ -124,16 +124,6 @@ class Avatar extends Base {
124
  return $this->_avatar_realtime_gen_dict[ $url ];
125
  }
126
 
127
- /**
128
- * Check if there is a cache folder
129
- *
130
- * @since 3.0
131
- * @access public
132
- */
133
- public static function has_cache() {
134
- return is_dir( LITESPEED_STATIC_DIR . '/avatar' );
135
- }
136
-
137
  /**
138
  * make cache folder
139
  *
@@ -196,26 +186,6 @@ class Avatar extends Base {
196
  return $filename;
197
  }
198
 
199
- /**
200
- * Delete file-based cache folder
201
- *
202
- * @since 3.0
203
- * @access public
204
- */
205
- public function rm_cache_folder( $subsite_id = false ) {
206
- if ( $subsite_id ) {
207
- file_exists( LITESPEED_STATIC_DIR . '/avatar' . $subsite_id ) && File::rrmdir( LITESPEED_STATIC_DIR . '/avatar/' . $subsite_id );
208
- }
209
- else {
210
- file_exists( LITESPEED_STATIC_DIR . '/avatar' ) && File::rrmdir( LITESPEED_STATIC_DIR . '/avatar' );
211
- }
212
-
213
- // Clear avatar summary
214
- self::save_summary( array() );
215
-
216
- Debug2::debug2( '[Avatar] Cleared avatar queue' );
217
- }
218
-
219
  /**
220
  * Cron generation
221
  *
@@ -270,7 +240,7 @@ class Avatar extends Base {
270
  self::save_summary();
271
 
272
  // Generate
273
- if ( ! self::has_cache() ) {
274
  $this->_mkdir();
275
  }
276
  $response = wp_remote_get( $url, array( 'timeout' => 180, 'stream' => true, 'filename' => $file ) );
124
  return $this->_avatar_realtime_gen_dict[ $url ];
125
  }
126
 
 
 
 
 
 
 
 
 
 
 
127
  /**
128
  * make cache folder
129
  *
186
  return $filename;
187
  }
188
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  /**
190
  * Cron generation
191
  *
240
  self::save_summary();
241
 
242
  // Generate
243
+ if ( ! $this->has_cache_folder( 'avatar' ) ) {
244
  $this->_mkdir();
245
  }
246
  $response = wp_remote_get( $url, array( 'timeout' => 180, 'stream' => true, 'filename' => $file ) );
src/cloud.cls.php CHANGED
@@ -9,13 +9,12 @@ defined( 'WPINC' ) || exit;
9
 
10
  class Cloud extends Base {
11
  const CLOUD_SERVER = 'https://api.quic.cloud';
12
- const CLOUD_IPS = 'https://api.quic.cloud/ips?json';
13
  const CLOUD_SERVER_DASH = 'https://my.quic.cloud';
14
  const CLOUD_SERVER_WP = 'https://wpapi.quic.cloud';
15
 
16
  const SVC_D_NODES = 'd/nodes';
17
  const SVC_D_SYNC_CONF = 'd/sync_conf';
18
- const SVC_D_REGIONNODES = 'd/regionnodes';
19
  const SVC_D_USAGE = 'd/usage';
20
  const SVC_PAGE_OPTM = 'page_optm';
21
  const SVC_CCSS = 'ccss';
@@ -44,7 +43,6 @@ class Cloud extends Base {
44
 
45
  private static $CENTER_SVC_SET = array(
46
  self::SVC_D_NODES,
47
- self::SVC_D_REGIONNODES,
48
  self::SVC_D_SYNC_CONF,
49
  self::SVC_D_USAGE,
50
  // self::API_NEWS,
@@ -67,6 +65,13 @@ class Cloud extends Base {
67
  self::API_BETA_TEST,
68
  );
69
 
 
 
 
 
 
 
 
70
  public static $SERVICES = array(
71
  self::SVC_IMG_OPTM,
72
  self::SVC_PAGE_OPTM,
@@ -228,7 +233,7 @@ class Cloud extends Base {
228
  * @since 3.0
229
  * @access private
230
  */
231
- public function allowance( $service ) {
232
  // Only auto sync usage at most one time per day
233
  if ( empty( $this->_summary[ 'last_request.' . self::SVC_D_USAGE ] ) || time() - $this->_summary[ 'last_request.' . self::SVC_D_USAGE ] > 86400 ) {
234
  $this->sync_usage();
@@ -254,6 +259,8 @@ class Cloud extends Base {
254
 
255
  $allowance = $usage[ 'quota' ] - $usage[ 'used' ];
256
 
 
 
257
  if ( $allowance > 0 ) {
258
  if ( $allowance_max && $allowance_max < $allowance ) {
259
  $allowance = $allowance_max;
@@ -262,6 +269,9 @@ class Cloud extends Base {
262
  // Daily limit @since 4.2
263
  if ( isset( $usage[ 'remaining_daily_quota' ] ) && $usage[ 'remaining_daily_quota' ] >= 0 && $usage[ 'remaining_daily_quota' ] < $allowance ) {
264
  $allowance = $usage[ 'remaining_daily_quota' ];
 
 
 
265
  }
266
 
267
  return $allowance;
@@ -351,11 +361,7 @@ class Cloud extends Base {
351
  }
352
 
353
  // Send request to Quic Online Service
354
- $cloud_endpoint = self::SVC_D_NODES;
355
- if($service == self::SVC_IMG_OPTM) {
356
- $cloud_endpoint = self::SVC_D_REGIONNODES;
357
- }
358
- $json = $this->_post( $cloud_endpoint, array( 'svc' => $service ) );
359
 
360
  // Check if get list correctly
361
  if ( empty( $json[ 'list' ] ) || ! is_array( $json[ 'list' ] ) ) {
@@ -390,6 +396,10 @@ class Cloud extends Base {
390
  if ( strlen( $speed ) == $range_len && substr( $speed, 0, 1 ) == $range_num ) {
391
  $valid_clouds[] = $node;
392
  }
 
 
 
 
393
  }
394
 
395
  if ( ! $valid_clouds ) {
@@ -400,7 +410,38 @@ class Cloud extends Base {
400
 
401
  Debug2::debug( '❄️ Closest nodes list', $valid_clouds );
402
 
403
- $closest = $valid_clouds[ array_rand( $valid_clouds ) ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
404
 
405
  Debug2::debug( '❄️ Chose node: ' . $closest );
406
 
@@ -616,6 +657,15 @@ class Cloud extends Base {
616
  return;
617
  }
618
 
 
 
 
 
 
 
 
 
 
619
  if ( ! empty( $json[ '_503' ] ) ) {
620
  Debug2::debug( '❄️ service 503 unavailable temporarily. ' . $json[ '_503' ] );
621
 
@@ -623,6 +673,10 @@ class Cloud extends Base {
623
  $msg .= ' ' . $json[ '_503' ] . " [server] $server [service] $service";
624
  Admin_Display::error( $msg );
625
 
 
 
 
 
626
  return;
627
  }
628
 
@@ -671,7 +725,8 @@ class Cloud extends Base {
671
  if ( ! empty( $json[ '_carry_on' ][ $v ] ) ) {
672
  switch ( $v ) {
673
  case 'usage':
674
- $this->_summary[ 'usage.' . $service ] = $json[ '_carry_on' ][ $v ];
 
675
  break;
676
 
677
  case 'promo':
@@ -1057,7 +1112,7 @@ class Cloud extends Base {
1057
  private function _update_ips() {
1058
  Debug2::debug( '❄️ Load remote Cloud IP list from ' . self::CLOUD_IPS );
1059
 
1060
- $response = wp_remote_get( self::CLOUD_IPS );
1061
  if ( is_wp_error( $response ) ) {
1062
  $error_message = $response->get_error_message();
1063
  Debug2::debug( '[CLoud] failed to get ip whitelist: ' . $error_message );
9
 
10
  class Cloud extends Base {
11
  const CLOUD_SERVER = 'https://api.quic.cloud';
12
+ const CLOUD_IPS = 'https://quic.cloud/ips';
13
  const CLOUD_SERVER_DASH = 'https://my.quic.cloud';
14
  const CLOUD_SERVER_WP = 'https://wpapi.quic.cloud';
15
 
16
  const SVC_D_NODES = 'd/nodes';
17
  const SVC_D_SYNC_CONF = 'd/sync_conf';
 
18
  const SVC_D_USAGE = 'd/usage';
19
  const SVC_PAGE_OPTM = 'page_optm';
20
  const SVC_CCSS = 'ccss';
43
 
44
  private static $CENTER_SVC_SET = array(
45
  self::SVC_D_NODES,
 
46
  self::SVC_D_SYNC_CONF,
47
  self::SVC_D_USAGE,
48
  // self::API_NEWS,
65
  self::API_BETA_TEST,
66
  );
67
 
68
+ public static $SERVICES_LOAD_CHECK = array(
69
+ self::SVC_CCSS,
70
+ self::SVC_UCSS,
71
+ self::SVC_LQIP,
72
+ self::SVC_HEALTH,
73
+ );
74
+
75
  public static $SERVICES = array(
76
  self::SVC_IMG_OPTM,
77
  self::SVC_PAGE_OPTM,
233
  * @since 3.0
234
  * @access private
235
  */
236
+ public function allowance( $service, &$err = false ) {
237
  // Only auto sync usage at most one time per day
238
  if ( empty( $this->_summary[ 'last_request.' . self::SVC_D_USAGE ] ) || time() - $this->_summary[ 'last_request.' . self::SVC_D_USAGE ] > 86400 ) {
239
  $this->sync_usage();
259
 
260
  $allowance = $usage[ 'quota' ] - $usage[ 'used' ];
261
 
262
+ $err = 'out_of_quota';
263
+
264
  if ( $allowance > 0 ) {
265
  if ( $allowance_max && $allowance_max < $allowance ) {
266
  $allowance = $allowance_max;
269
  // Daily limit @since 4.2
270
  if ( isset( $usage[ 'remaining_daily_quota' ] ) && $usage[ 'remaining_daily_quota' ] >= 0 && $usage[ 'remaining_daily_quota' ] < $allowance ) {
271
  $allowance = $usage[ 'remaining_daily_quota' ];
272
+ if ( ! $allowance ) {
273
+ $err = 'out_of_daily_quota';
274
+ }
275
  }
276
 
277
  return $allowance;
361
  }
362
 
363
  // Send request to Quic Online Service
364
+ $json = $this->_post( self::SVC_D_NODES, array( 'svc' => $service ) );
 
 
 
 
365
 
366
  // Check if get list correctly
367
  if ( empty( $json[ 'list' ] ) || ! is_array( $json[ 'list' ] ) ) {
396
  if ( strlen( $speed ) == $range_len && substr( $speed, 0, 1 ) == $range_num ) {
397
  $valid_clouds[] = $node;
398
  }
399
+ // Append the lower speed ones
400
+ else if ( $speed < $min * 2 ) {
401
+ $valid_clouds[] = $node;
402
+ }
403
  }
404
 
405
  if ( ! $valid_clouds ) {
410
 
411
  Debug2::debug( '❄️ Closest nodes list', $valid_clouds );
412
 
413
+ // Check server load
414
+ if ( in_array( $service, self::$SERVICES_LOAD_CHECK ) ) {
415
+ $valid_cloud_loads = array();
416
+ foreach ( $valid_clouds as $k => $v ) {
417
+ $response = wp_remote_get( $v, array( 'timeout' => 5, 'sslverify' => true ) );
418
+ if ( is_wp_error( $response ) ) {
419
+ $error_message = $response->get_error_message();
420
+ Debug2::debug( '❄️ failed to do load checker: ' . $error_message );
421
+ continue;
422
+ }
423
+
424
+ $curr_load = json_decode( $response[ 'body' ], true );
425
+ if ( ! empty( $curr_load[ '_res' ] ) && $curr_load[ '_res' ] == 'ok' && isset( $curr_load[ 'load' ] ) ) {
426
+ $valid_cloud_loads[ $v ] = $curr_load[ 'load' ];
427
+ }
428
+ }
429
+
430
+ if ( ! $valid_cloud_loads ) {
431
+ $msg = __( 'Cloud Error', 'litespeed-cache' ) . ": [Service] $service [Info] " . __( 'No available Cloud Node after checked server load.', 'litespeed-cache' );
432
+ Admin_Display::error( $msg );
433
+ return false;
434
+ }
435
+
436
+ Debug2::debug( '❄️ Closest nodes list after load check', $valid_cloud_loads );
437
+
438
+ $qualified_list = array_keys( $valid_cloud_loads, min( $valid_cloud_loads ) );
439
+ }
440
+ else {
441
+ $qualified_list = $valid_clouds;
442
+ }
443
+
444
+ $closest = $qualified_list[ array_rand( $qualified_list ) ];
445
 
446
  Debug2::debug( '❄️ Chose node: ' . $closest );
447
 
657
  return;
658
  }
659
 
660
+ if ( ! empty( $json[ '_code' ] ) ) {
661
+ if ( $json[ '_code' ] == 'heavy_load' || $json[ '_code' ] == 'redetect_node' ) {
662
+ // Force redetect node
663
+ Debug2::debug( '❄️ Node redetecting node [svc] ' . $service );
664
+ Admin_Display::info( __( 'Redetected node', 'litespeed-cache' ) . ': ' . Error::msg( $json[ '_code' ] ) );
665
+ $this->detect_cloud( $service, true );
666
+ }
667
+ }
668
+
669
  if ( ! empty( $json[ '_503' ] ) ) {
670
  Debug2::debug( '❄️ service 503 unavailable temporarily. ' . $json[ '_503' ] );
671
 
673
  $msg .= ' ' . $json[ '_503' ] . " [server] $server [service] $service";
674
  Admin_Display::error( $msg );
675
 
676
+ // Force redetect node
677
+ Debug2::debug( '❄️ Node error, redetecting node [svc] ' . $service );
678
+ $this->detect_cloud( $service, true );
679
+
680
  return;
681
  }
682
 
725
  if ( ! empty( $json[ '_carry_on' ][ $v ] ) ) {
726
  switch ( $v ) {
727
  case 'usage':
728
+ $usage_svc_tag = in_array( $service, array( self::SVC_CCSS, self::SVC_UCSS ) ) ? self::SVC_PAGE_OPTM : $service;
729
+ $this->_summary[ 'usage.' . $usage_svc_tag ] = $json[ '_carry_on' ][ $v ];
730
  break;
731
 
732
  case 'promo':
1112
  private function _update_ips() {
1113
  Debug2::debug( '❄️ Load remote Cloud IP list from ' . self::CLOUD_IPS );
1114
 
1115
+ $response = wp_remote_get( self::CLOUD_IPS . '?json' );
1116
  if ( is_wp_error( $response ) ) {
1117
  $error_message = $response->get_error_message();
1118
  Debug2::debug( '[CLoud] failed to get ip whitelist: ' . $error_message );
src/css.cls.php CHANGED
@@ -28,6 +28,39 @@ class CSS extends Base {
28
  add_filter( 'litespeed_ucss_whitelist', array( $this->cls( 'Data' ), 'load_ucss_whitelist' ) );
29
  }
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  /**
32
  * HTML lazyload CSS
33
  * @since 4.0
@@ -56,45 +89,6 @@ class CSS extends Base {
56
  return '<style id="litespeed-ccss">' . $rules . '</style>';
57
  }
58
 
59
- /**
60
- * Detect if there is ccss/ucss folder or not
61
- *
62
- * @since 4.0
63
- */
64
- public function has_ccss_folder() {
65
- $subsite_id = is_multisite() && ! is_network_admin() ? get_current_blog_id() : '';
66
- if ( file_exists( LITESPEED_STATIC_DIR . '/ccss/' . $subsite_id ) ) {
67
- return true;
68
- }
69
- if ( file_exists( LITESPEED_STATIC_DIR . '/ucss/' . $subsite_id ) ) {
70
- return true;
71
- }
72
- return false;
73
- }
74
-
75
- /**
76
- * Delete file-based cache folder
77
- *
78
- * @since 2.3
79
- * @access public
80
- */
81
- public function rm_cache_folder( $subsite_id = false ) {
82
- if ( $subsite_id ) {
83
- file_exists( LITESPEED_STATIC_DIR . '/ccss/' . $subsite_id ) && File::rrmdir( LITESPEED_STATIC_DIR . '/ccss/' . $subsite_id );
84
- file_exists( LITESPEED_STATIC_DIR . '/ucss/' . $subsite_id ) && File::rrmdir( LITESPEED_STATIC_DIR . '/ucss/' . $subsite_id );
85
- }
86
- else {
87
- file_exists( LITESPEED_STATIC_DIR . '/ccss' ) && File::rrmdir( LITESPEED_STATIC_DIR . '/ccss' );
88
- file_exists( LITESPEED_STATIC_DIR . '/ucss' ) && File::rrmdir( LITESPEED_STATIC_DIR . '/ucss' );
89
- }
90
-
91
- // Clear All summary data
92
- $this->_summary = array();
93
- self::save_summary();
94
-
95
- Debug2::debug2( '[CSS] Cleared ccss/ucss queue' );
96
- }
97
-
98
  /**
99
  * Generate CCSS url tag
100
  *
@@ -155,7 +149,7 @@ class CSS extends Base {
155
 
156
 
157
  // Store it to prepare for cron
158
- $this->_queue = $this->_load_queue( 'ccss' );
159
 
160
  if ( count( $this->_queue ) > 500 ) {
161
  Debug2::debug( '[CSS] CCSS Queue is full - 500' );
@@ -172,7 +166,7 @@ class CSS extends Base {
172
  'vary' => $vary,
173
  'url_tag' => $url_tag,
174
  ); // Current UA will be used to request
175
- $this->_save_queue( 'ccss', $this->_queue );
176
  Debug2::debug( '[CSS] Added queue_ccss [url_tag] ' . $url_tag . ' [UA] ' . $ua . ' [vary] ' . $vary . ' [uid] ' . $uid );
177
 
178
  // Prepare cache tag for later purge
@@ -220,7 +214,7 @@ class CSS extends Base {
220
  $ua = ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) ? $_SERVER[ 'HTTP_USER_AGENT' ] : '';
221
 
222
  // Store it for cron
223
- $this->_queue = $this->_load_queue( 'ucss' );
224
 
225
  if ( count( $this->_queue ) > 500 ) {
226
  Debug2::debug( '[CSS] UCSS Queue is full - 500' );
@@ -237,7 +231,7 @@ class CSS extends Base {
237
  'vary' => $vary,
238
  'url_tag' => $url_tag,
239
  ); // Current UA will be used to request
240
- $this->_save_queue( 'ucss', $this->_queue );
241
  Debug2::debug( '[CSS] Added queue_ucss [url_tag] ' . $url_tag . ' [UA] ' . $ua . ' [vary] ' . $vary . ' [uid] ' . $uid );
242
 
243
  // Prepare cache tag for later purge
@@ -294,7 +288,7 @@ class CSS extends Base {
294
  * @since 4.2
295
  */
296
  private function _cron_handler( $type, $continue ) {
297
- $this->_queue = $this->_load_queue( $type );
298
 
299
  if ( empty( $this->_queue ) ) {
300
  return;
@@ -320,7 +314,7 @@ class CSS extends Base {
320
 
321
  if ( $type == 'ccss' && empty( $v[ 'url_tag' ] ) ) {
322
  unset( $this->_queue[ $k ] );
323
- $this->_save_queue( $type, $this->_queue );
324
  Debug2::debug( '[CCSS] wrong queue_ccss format' );
325
  continue;
326
  }
@@ -333,7 +327,7 @@ class CSS extends Base {
333
  $res = $this->_send_req( $v[ 'url' ], $k, $v[ 'uid' ], $v[ 'user_agent' ], $v[ 'vary' ], $v[ 'url_tag' ], $type, $v[ 'is_mobile' ], $v[ 'is_webp' ] );
334
  if ( ! $res ) { // Status is wrong, drop this this->_queue
335
  unset( $this->_queue[ $k ] );
336
- $this->_save_queue( $type, $this->_queue );
337
 
338
  if ( $i > 3 ) {
339
  $this->_print_loading( count( $this->_queue ), $type_tag );
@@ -343,8 +337,13 @@ class CSS extends Base {
343
  continue;
344
  }
345
 
 
 
 
 
 
346
  $this->_queue[ $k ][ '_status' ] = 'requested';
347
- $this->_save_queue( $type, $this->_queue );
348
 
349
  // only request first one
350
  if ( ! $continue ) {
@@ -367,11 +366,12 @@ class CSS extends Base {
367
  private function _send_req( $request_url, $queue_k, $uid, $user_agent, $vary, $url_tag, $type, $is_mobile, $is_webp ) {
368
  $svc = $type == 'ccss' ? Cloud::SVC_CCSS : Cloud::SVC_UCSS;
369
  // Check if has credit to push or not
370
- $allowance = $this->cls( 'Cloud' )->allowance( $svc );
 
371
  if ( ! $allowance ) {
372
- Debug2::debug( '[CCSS] ❌ No credit' );
373
- Admin_Display::error( Error::msg( 'lack_of_quota' ) );
374
- return false;
375
  }
376
 
377
  set_time_limit( 120 );
@@ -381,7 +381,7 @@ class CSS extends Base {
381
  self::save_summary();
382
 
383
  // Gather guest HTML to send
384
- $html = $this->_prepare_html( $request_url, $user_agent, $uid );
385
 
386
  if ( ! $html ) {
387
  return false;
@@ -390,10 +390,10 @@ class CSS extends Base {
390
  // Parse HTML to gather all CSS content before requesting
391
  $css = false;
392
  if ( $type == 'ccss' ) {
393
- list( $css, $html ) = $this->_prepare_css( $html, $is_webp );
394
  }
395
  else {
396
- list( , $html ) = $this->_prepare_css( $html, $is_webp, true ); // Use this to drop CSS from HTML as we don't need those CSS to generate UCSS
397
  $filename = $this->cls( 'Data' )->load_url_file( $url_tag, $vary, 'css' );
398
  $filepath_prefix = $this->_build_filepath_prefix( 'css' );
399
  $static_file = LITESPEED_STATIC_DIR . $filepath_prefix . $filename . '.css';
@@ -512,7 +512,7 @@ class CSS extends Base {
512
 
513
  Debug2::debug( '[CSS] Received notification [Type] ' . $type . ' [Count] ' . count( $post_data[ 'data' ] ) );
514
 
515
- $this->_queue = $this->_load_queue( $type );
516
 
517
  // Clear existing queues
518
  $valid_count = 0;
@@ -538,31 +538,13 @@ class CSS extends Base {
538
  }
539
  }
540
 
541
- $this->_save_queue( $type, $this->_queue );
542
 
543
  Debug2::debug( '[CSS] Saved result [valid count] ' . $valid_count );
544
 
545
  return array( 'count' => $valid_count );
546
  }
547
 
548
- /**
549
- * Clear all waiting queues
550
- *
551
- * @since 3.4
552
- */
553
- public function clear_q( $type ) {
554
- $filepath_prefix = $this->_build_filepath_prefix( $type );
555
- $static_path = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';
556
-
557
- if ( file_exists( $static_path ) ) {
558
- Debug2::debug( '[CSS] Unlinked static file LITESPEED_STATIC_DIR/' . $filepath_prefix . '.litespeed_conf.dat' );
559
- unlink( $static_path );
560
- }
561
-
562
- $msg = __( 'Queue cleared successfully', 'litespeed-cache' ) . ': ' . strtoupper( $type );
563
- Admin_Display::succeed( $msg );
564
- }
565
-
566
  /**
567
  * Print a loading message when redirecting CCSS/UCSS page to aviod whiteboard confusion
568
  */
@@ -581,8 +563,8 @@ class CSS extends Base {
581
  */
582
  public function test_url( $request_url ) {
583
  $user_agent = $_SERVER[ 'HTTP_USER_AGENT' ];
584
- $html = $this->_prepare_html( $request_url, $user_agent );
585
- list( $css, $html ) = $this->_prepare_css( $html, true, true );
586
  // var_dump( $css );
587
  // $html = <<<EOT
588
 
@@ -613,7 +595,7 @@ class CSS extends Base {
613
  *
614
  * @since 3.4.3
615
  */
616
- private function _prepare_html( $request_url, $user_agent, $uid = false ) {
617
  $html = $this->cls( 'Crawler' )->self_curl( add_query_arg( 'LSCWP_CTRL', 'before_optm', $request_url ), $user_agent, $uid );
618
  Debug2::debug2( '[CSS] self_curl result....', $html );
619
 
@@ -631,7 +613,7 @@ class CSS extends Base {
631
  *
632
  * @since 3.4.3
633
  */
634
- private function _prepare_css( $html, $is_webp = false, $dryrun = false ) {
635
  $css = '';
636
  preg_match_all( '#<link ([^>]+)/?>|<style([^>]*)>([^<]+)</style>#isU', $html, $matches, PREG_SET_ORDER );
637
  foreach ( $matches as $match ) {
28
  add_filter( 'litespeed_ucss_whitelist', array( $this->cls( 'Data' ), 'load_ucss_whitelist' ) );
29
  }
30
 
31
+ /**
32
+ * Build the static filepath
33
+ *
34
+ * @since 4.3 Elevated to root.cls
35
+ * @since 4.3 Have to keep till v4.5 for compatibility when upgrade from v4.2 to v4.3
36
+ */
37
+ protected function _build_filepath_prefix( $type ) {
38
+ $filepath_prefix = '/' . $type . '/';
39
+ if ( is_multisite() ) {
40
+ $filepath_prefix .= get_current_blog_id() . '/';
41
+ }
42
+
43
+ return $filepath_prefix;
44
+ }
45
+
46
+ /**
47
+ * Clear all waiting queues
48
+ *
49
+ * @since 4.3 Elevated to root.cls
50
+ * @since 4.3 Have to keep till v4.5 for compatibility when upgrade from v4.2 to v4.3
51
+ */
52
+ public function clear_q( $type ) {
53
+ $filepath_prefix = $this->_build_filepath_prefix( $type );
54
+ $static_path = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';
55
+
56
+ if ( file_exists( $static_path ) ) {
57
+ unlink( $static_path );
58
+ }
59
+
60
+ $msg = __( 'Queue cleared successfully.', 'litespeed-cache' );
61
+ Admin_Display::succeed( $msg );
62
+ }
63
+
64
  /**
65
  * HTML lazyload CSS
66
  * @since 4.0
89
  return '<style id="litespeed-ccss">' . $rules . '</style>';
90
  }
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  /**
93
  * Generate CCSS url tag
94
  *
149
 
150
 
151
  // Store it to prepare for cron
152
+ $this->_queue = $this->load_queue( 'ccss' );
153
 
154
  if ( count( $this->_queue ) > 500 ) {
155
  Debug2::debug( '[CSS] CCSS Queue is full - 500' );
166
  'vary' => $vary,
167
  'url_tag' => $url_tag,
168
  ); // Current UA will be used to request
169
+ $this->save_queue( 'ccss', $this->_queue );
170
  Debug2::debug( '[CSS] Added queue_ccss [url_tag] ' . $url_tag . ' [UA] ' . $ua . ' [vary] ' . $vary . ' [uid] ' . $uid );
171
 
172
  // Prepare cache tag for later purge
214
  $ua = ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) ? $_SERVER[ 'HTTP_USER_AGENT' ] : '';
215
 
216
  // Store it for cron
217
+ $this->_queue = $this->load_queue( 'ucss' );
218
 
219
  if ( count( $this->_queue ) > 500 ) {
220
  Debug2::debug( '[CSS] UCSS Queue is full - 500' );
231
  'vary' => $vary,
232
  'url_tag' => $url_tag,
233
  ); // Current UA will be used to request
234
+ $this->save_queue( 'ucss', $this->_queue );
235
  Debug2::debug( '[CSS] Added queue_ucss [url_tag] ' . $url_tag . ' [UA] ' . $ua . ' [vary] ' . $vary . ' [uid] ' . $uid );
236
 
237
  // Prepare cache tag for later purge
288
  * @since 4.2
289
  */
290
  private function _cron_handler( $type, $continue ) {
291
+ $this->_queue = $this->load_queue( $type );
292
 
293
  if ( empty( $this->_queue ) ) {
294
  return;
314
 
315
  if ( $type == 'ccss' && empty( $v[ 'url_tag' ] ) ) {
316
  unset( $this->_queue[ $k ] );
317
+ $this->save_queue( $type, $this->_queue );
318
  Debug2::debug( '[CCSS] wrong queue_ccss format' );
319
  continue;
320
  }
327
  $res = $this->_send_req( $v[ 'url' ], $k, $v[ 'uid' ], $v[ 'user_agent' ], $v[ 'vary' ], $v[ 'url_tag' ], $type, $v[ 'is_mobile' ], $v[ 'is_webp' ] );
328
  if ( ! $res ) { // Status is wrong, drop this this->_queue
329
  unset( $this->_queue[ $k ] );
330
+ $this->save_queue( $type, $this->_queue );
331
 
332
  if ( $i > 3 ) {
333
  $this->_print_loading( count( $this->_queue ), $type_tag );
337
  continue;
338
  }
339
 
340
+ // Exit queue if out of quota
341
+ if ( $res == 'out_of_quota' ) {
342
+ return;
343
+ }
344
+
345
  $this->_queue[ $k ][ '_status' ] = 'requested';
346
+ $this->save_queue( $type, $this->_queue );
347
 
348
  // only request first one
349
  if ( ! $continue ) {
366
  private function _send_req( $request_url, $queue_k, $uid, $user_agent, $vary, $url_tag, $type, $is_mobile, $is_webp ) {
367
  $svc = $type == 'ccss' ? Cloud::SVC_CCSS : Cloud::SVC_UCSS;
368
  // Check if has credit to push or not
369
+ $err = false;
370
+ $allowance = $this->cls( 'Cloud' )->allowance( $svc, $err );
371
  if ( ! $allowance ) {
372
+ Debug2::debug( '[CCSS] ❌ No credit: ' . $err );
373
+ $err && Admin_Display::error( Error::msg( $err ) );
374
+ return 'out_of_quota';
375
  }
376
 
377
  set_time_limit( 120 );
381
  self::save_summary();
382
 
383
  // Gather guest HTML to send
384
+ $html = $this->prepare_html( $request_url, $user_agent, $uid );
385
 
386
  if ( ! $html ) {
387
  return false;
390
  // Parse HTML to gather all CSS content before requesting
391
  $css = false;
392
  if ( $type == 'ccss' ) {
393
+ list( $css, $html ) = $this->prepare_css( $html, $is_webp );
394
  }
395
  else {
396
+ list( , $html ) = $this->prepare_css( $html, $is_webp, true ); // Use this to drop CSS from HTML as we don't need those CSS to generate UCSS
397
  $filename = $this->cls( 'Data' )->load_url_file( $url_tag, $vary, 'css' );
398
  $filepath_prefix = $this->_build_filepath_prefix( 'css' );
399
  $static_file = LITESPEED_STATIC_DIR . $filepath_prefix . $filename . '.css';
512
 
513
  Debug2::debug( '[CSS] Received notification [Type] ' . $type . ' [Count] ' . count( $post_data[ 'data' ] ) );
514
 
515
+ $this->_queue = $this->load_queue( $type );
516
 
517
  // Clear existing queues
518
  $valid_count = 0;
538
  }
539
  }
540
 
541
+ $this->save_queue( $type, $this->_queue );
542
 
543
  Debug2::debug( '[CSS] Saved result [valid count] ' . $valid_count );
544
 
545
  return array( 'count' => $valid_count );
546
  }
547
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
548
  /**
549
  * Print a loading message when redirecting CCSS/UCSS page to aviod whiteboard confusion
550
  */
563
  */
564
  public function test_url( $request_url ) {
565
  $user_agent = $_SERVER[ 'HTTP_USER_AGENT' ];
566
+ $html = $this->prepare_html( $request_url, $user_agent );
567
+ list( $css, $html ) = $this->prepare_css( $html, true, true );
568
  // var_dump( $css );
569
  // $html = <<<EOT
570
 
595
  *
596
  * @since 3.4.3
597
  */
598
+ public function prepare_html( $request_url, $user_agent, $uid = false ) {
599
  $html = $this->cls( 'Crawler' )->self_curl( add_query_arg( 'LSCWP_CTRL', 'before_optm', $request_url ), $user_agent, $uid );
600
  Debug2::debug2( '[CSS] self_curl result....', $html );
601
 
613
  *
614
  * @since 3.4.3
615
  */
616
+ public function prepare_css( $html, $is_webp = false, $dryrun = false ) {
617
  $css = '';
618
  preg_match_all( '#<link ([^>]+)/?>|<style([^>]*)>([^<]+)</style>#isU', $html, $matches, PREG_SET_ORDER );
619
  foreach ( $matches as $match ) {
src/data.cls.php CHANGED
@@ -21,6 +21,9 @@ class Data extends Root {
21
  '4.1' => array(
22
  'litespeed_update_4_1',
23
  ),
 
 
 
24
  );
25
 
26
  private $_db_site_updater = array(
21
  '4.1' => array(
22
  'litespeed_update_4_1',
23
  ),
24
+ '4.3' => array(
25
+ 'litespeed_update_4_3',
26
+ ),
27
  );
28
 
29
  private $_db_site_updater = array(
src/data.upgrade.func.php CHANGED
@@ -13,6 +13,16 @@ use LiteSpeed\Conf;
13
  use LiteSpeed\Admin_Display;
14
  use LiteSpeed\File;
15
 
 
 
 
 
 
 
 
 
 
 
16
  /**
17
  * Drop object cache data file
18
  * @since 4.1
@@ -38,8 +48,8 @@ function litespeed_update_4() {
38
  $q = 'DROP TABLE IF EXISTS ' . $tb;
39
  $wpdb->query( $q );
40
 
41
- if ( file_exists( LITESPEED_STATIC_DIR . '/ccss' ) ) {
42
- File::rrmdir( LITESPEED_STATIC_DIR . '/ccss' );
43
  }
44
  }
45
 
13
  use LiteSpeed\Admin_Display;
14
  use LiteSpeed\File;
15
 
16
+ /**
17
+ * Drop cssjs table and rm cssjs folder
18
+ * @since 4.3
19
+ */
20
+ function litespeed_update_4_3() {
21
+ if ( file_exists( LITESPEED_STATIC_DIR . '/ccsjs' ) ) {
22
+ File::rrmdir( LITESPEED_STATIC_DIR . '/ccsjs' );
23
+ }
24
+ }
25
+
26
  /**
27
  * Drop object cache data file
28
  * @since 4.1
48
  $q = 'DROP TABLE IF EXISTS ' . $tb;
49
  $wpdb->query( $q );
50
 
51
+ if ( file_exists( LITESPEED_STATIC_DIR . '/ccsjs' ) ) {
52
+ File::rrmdir( LITESPEED_STATIC_DIR . '/ccsjs' );
53
  }
54
  }
55
 
src/doc.cls.php CHANGED
@@ -104,7 +104,7 @@ class Doc {
104
  echo '<div class="litespeed-primary">';
105
  echo '⚠️ ' . sprintf( __( 'For online services to work correctly, you must whitelist all %s server IPs.', 'litespeed-cache' ), 'QUIC.cloud' ) . '<br/>';
106
  echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . __( 'Before generating key, please verify all IPs on this list are whitelisted', 'litespeed-cache' ) . ': ';
107
- echo '<a href="' . Cloud::CLOUD_SERVER . '/ips" target="_blank">' . __( 'Current Online Server IPs', 'litespeed-cache' ) . '</a>';
108
  echo '</div>';
109
  }
110
 
104
  echo '<div class="litespeed-primary">';
105
  echo '⚠️ ' . sprintf( __( 'For online services to work correctly, you must whitelist all %s server IPs.', 'litespeed-cache' ), 'QUIC.cloud' ) . '<br/>';
106
  echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . __( 'Before generating key, please verify all IPs on this list are whitelisted', 'litespeed-cache' ) . ': ';
107
+ echo '<a href="' . Cloud::CLOUD_IPS . '" target="_blank">' . __( 'Current Online Server IPs', 'litespeed-cache' ) . '</a>';
108
  echo '</div>';
109
  }
110
 
src/error.cls.php CHANGED
@@ -49,11 +49,11 @@ class Error {
49
  break;
50
 
51
  case 'out_of_daily_quota':
52
- $msg = __( 'You don\'t have enough daily quota for current service left today.', 'litespeed-cache' );
53
  break;
54
 
55
- case 'lack_of_quota':
56
- $msg = __( 'You don\'t have enough quota for current service left this month.', 'litespeed-cache' );
57
  break;
58
 
59
  case 'too_many_requested':
@@ -88,6 +88,14 @@ class Error {
88
  $msg = __( 'The domain key is not correct. Please try to sync your domain key again.', 'litespeed-cache' );
89
  break;
90
 
 
 
 
 
 
 
 
 
91
  case 'err_overdraw':
92
  $msg = __( 'Credits are not enough to proceed the current request.', 'litespeed-cache' );
93
  break;
49
  break;
50
 
51
  case 'out_of_daily_quota':
52
+ $msg = __( 'You don\'t have enough daily quota left for current service today.', 'litespeed-cache' );
53
  break;
54
 
55
+ case 'out_of_quota':
56
+ $msg = __( 'You don\'t have enough quota left for current service this month.', 'litespeed-cache' );
57
  break;
58
 
59
  case 'too_many_requested':
88
  $msg = __( 'The domain key is not correct. Please try to sync your domain key again.', 'litespeed-cache' );
89
  break;
90
 
91
+ case 'heavy_load':
92
+ $msg = __( 'The current server is under heavy load.', 'litespeed-cache' );
93
+ break;
94
+
95
+ case 'redetect_node':
96
+ $msg = __( 'Online node needs to be redetected.', 'litespeed-cache' );
97
+ break;
98
+
99
  case 'err_overdraw':
100
  $msg = __( 'Credits are not enough to proceed the current request.', 'litespeed-cache' );
101
  break;
src/file.cls.php CHANGED
@@ -12,10 +12,6 @@ defined( 'WPINC' ) || exit;
12
  class File {
13
  const MARKER = 'LiteSpeed Operator';
14
 
15
- function __construct() {
16
- // nothing to do here
17
- }
18
-
19
  /**
20
  * Detect if an URL is 404
21
  *
@@ -165,7 +161,7 @@ class File {
165
  }
166
  restore_error_handler();
167
  }
168
- elseif ( ! is_writeable( $filename ) ) {
169
  return $silence ? false : sprintf( __( 'File %s is not writable.', 'litespeed-cache' ), $filename );
170
  }
171
 
@@ -349,7 +345,7 @@ class File {
349
  }
350
  restore_error_handler();
351
  }
352
- elseif ( ! is_writeable( $filename ) ) {
353
  Error::t( 'W', $filename );
354
  }
355
 
12
  class File {
13
  const MARKER = 'LiteSpeed Operator';
14
 
 
 
 
 
15
  /**
16
  * Detect if an URL is 404
17
  *
161
  }
162
  restore_error_handler();
163
  }
164
+ elseif ( ! is_writable( $filename ) ) {
165
  return $silence ? false : sprintf( __( 'File %s is not writable.', 'litespeed-cache' ), $filename );
166
  }
167
 
345
  }
346
  restore_error_handler();
347
  }
348
+ elseif ( ! is_writable( $filename ) ) {
349
  Error::t( 'W', $filename );
350
  }
351
 
src/gui.cls.php CHANGED
@@ -499,7 +499,7 @@ class GUI extends Base {
499
  ) );
500
  }
501
 
502
- if ( $this->cls( 'CSS' )->has_ccss_folder() ) {
503
  $wp_admin_bar->add_menu( array(
504
  'parent' => 'litespeed-menu',
505
  'id' => 'litespeed-purge-ccss',
@@ -509,7 +509,17 @@ class GUI extends Base {
509
  ) );
510
  }
511
 
512
- if ( Placeholder::has_lqip_cache() ) {
 
 
 
 
 
 
 
 
 
 
513
  $wp_admin_bar->add_menu( array(
514
  'parent' => 'litespeed-menu',
515
  'id' => 'litespeed-purge-placeholder',
@@ -519,7 +529,7 @@ class GUI extends Base {
519
  ) );
520
  }
521
 
522
- if ( Avatar::has_cache() ) {
523
  $wp_admin_bar->add_menu( array(
524
  'parent' => 'litespeed-menu',
525
  'id' => 'litespeed-purge-avatar',
@@ -640,7 +650,7 @@ class GUI extends Base {
640
  ) );
641
  }
642
 
643
- if ( $this->cls( 'CSS' )->has_ccss_folder() ) {
644
  $wp_admin_bar->add_menu( array(
645
  'parent' => 'litespeed-menu',
646
  'id' => 'litespeed-purge-ccss',
@@ -650,7 +660,17 @@ class GUI extends Base {
650
  ) );
651
  }
652
 
653
- if ( Placeholder::has_lqip_cache() ) {
 
 
 
 
 
 
 
 
 
 
654
  $wp_admin_bar->add_menu( array(
655
  'parent' => 'litespeed-menu',
656
  'id' => 'litespeed-purge-placeholder',
@@ -660,7 +680,7 @@ class GUI extends Base {
660
  ) );
661
  }
662
 
663
- if ( Avatar::has_cache() ) {
664
  $wp_admin_bar->add_menu( array(
665
  'parent' => 'litespeed-menu',
666
  'id' => 'litespeed-purge-avatar',
499
  ) );
500
  }
501
 
502
+ if ( $this->has_cache_folder( 'ccss' ) ) {
503
  $wp_admin_bar->add_menu( array(
504
  'parent' => 'litespeed-menu',
505
  'id' => 'litespeed-purge-ccss',
509
  ) );
510
  }
511
 
512
+ if ( $this->has_cache_folder( 'ucss' ) ) {
513
+ $wp_admin_bar->add_menu( array(
514
+ 'parent' => 'litespeed-menu',
515
+ 'id' => 'litespeed-purge-ucss',
516
+ 'title' => __( 'Purge All', 'litespeed-cache' ) . ' - UCSS',
517
+ 'href' => Utility::build_url( Router::ACTION_PURGE, Purge::TYPE_PURGE_ALL_UCSS, false, '_ori' ),
518
+ 'meta' => array( 'tabindex' => '0' ),
519
+ ) );
520
+ }
521
+
522
+ if ( $this->has_cache_folder( 'lqip' ) ) {
523
  $wp_admin_bar->add_menu( array(
524
  'parent' => 'litespeed-menu',
525
  'id' => 'litespeed-purge-placeholder',
529
  ) );
530
  }
531
 
532
+ if ( $this->has_cache_folder( 'avatar' ) ) {
533
  $wp_admin_bar->add_menu( array(
534
  'parent' => 'litespeed-menu',
535
  'id' => 'litespeed-purge-avatar',
650
  ) );
651
  }
652
 
653
+ if ( $this->has_cache_folder( 'ccss' ) ) {
654
  $wp_admin_bar->add_menu( array(
655
  'parent' => 'litespeed-menu',
656
  'id' => 'litespeed-purge-ccss',
660
  ) );
661
  }
662
 
663
+ if ( $this->has_cache_folder( 'ucss' ) ) {
664
+ $wp_admin_bar->add_menu( array(
665
+ 'parent' => 'litespeed-menu',
666
+ 'id' => 'litespeed-purge-ucss',
667
+ 'title' => __( 'Purge All', 'litespeed-cache' ) . ' - UCSS',
668
+ 'href' => Utility::build_url( Router::ACTION_PURGE, Purge::TYPE_PURGE_ALL_UCSS ),
669
+ 'meta' => array( 'tabindex' => '0' ),
670
+ ) );
671
+ }
672
+
673
+ if ( $this->has_cache_folder( 'lqip' ) ) {
674
  $wp_admin_bar->add_menu( array(
675
  'parent' => 'litespeed-menu',
676
  'id' => 'litespeed-purge-placeholder',
680
  ) );
681
  }
682
 
683
+ if ( $this->has_cache_folder( 'avatar' ) ) {
684
  $wp_admin_bar->add_menu( array(
685
  'parent' => 'litespeed-menu',
686
  'id' => 'litespeed-purge-avatar',
src/img-optm.cls.php CHANGED
@@ -407,7 +407,7 @@ class Img_Optm extends Base {
407
 
408
  if ( ! $allowance ) {
409
  Debug2::debug( '[Img_Optm] ❌ No credit' );
410
- Admin_Display::error( Error::msg( 'lack_of_quota' ) );
411
  return;
412
  }
413
 
407
 
408
  if ( ! $allowance ) {
409
  Debug2::debug( '[Img_Optm] ❌ No credit' );
410
+ Admin_Display::error( Error::msg( 'out_of_quota' ) );
411
  return;
412
  }
413
 
src/optimize.cls.php CHANGED
@@ -237,7 +237,7 @@ class Optimize extends Base {
237
  */
238
  private function _optimize() {
239
  $this->cfg_http2_css = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_CSS_HTTP2 );
240
- $this->cfg_http2_js = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_JS_HTTP2 );
241
  $this->cfg_css_min = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_CSS_MIN );
242
  $this->cfg_css_comb = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_CSS_COMB );
243
  $this->cfg_js_min = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_JS_MIN );
237
  */
238
  private function _optimize() {
239
  $this->cfg_http2_css = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_CSS_HTTP2 );
240
+ $this->cfg_http2_js = ! defined( 'LITESPEED_GUEST_OPTM' ) && $this->conf( self::O_OPTM_JS_HTTP2 );
241
  $this->cfg_css_min = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_CSS_MIN );
242
  $this->cfg_css_comb = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_CSS_COMB );
243
  $this->cfg_js_min = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_JS_MIN );
src/placeholder.cls.php CHANGED
@@ -250,7 +250,7 @@ class Placeholder extends Base {
250
  $tmp_placeholder = $this->_generate_placeholder_locally( $size );
251
 
252
  // Store it to prepare for cron
253
- $queue = $this->_load_queue( 'lqip' );
254
  if ( in_array( $arr_key, $queue ) ) {
255
  Debug2::debug2( '[LQIP] already in queue' );
256
 
@@ -264,22 +264,12 @@ class Placeholder extends Base {
264
  }
265
 
266
  $queue[] = $arr_key;
267
- $this->_save_queue( 'lqip', $queue );
268
  Debug2::debug( '[LQIP] Added placeholder queue' );
269
 
270
  return $tmp_placeholder;
271
  }
272
 
273
- /**
274
- * Check if there is a LQIP cache folder
275
- *
276
- * @since 3.0
277
- * @access public
278
- */
279
- public static function has_lqip_cache() {
280
- return is_dir( LITESPEED_STATIC_DIR . '/lqip' );
281
- }
282
-
283
  /**
284
  * Generate realpath of placeholder file
285
  *
@@ -294,38 +284,23 @@ class Placeholder extends Base {
294
  $src = substr( $src, 0, -5 );
295
  }
296
 
 
 
297
  // External images will use cache folder directly
298
  $domain = parse_url( $src, PHP_URL_HOST );
299
  if ( $domain && ! Utility::internal( $domain ) ) { // todo: need to improve `util:internal()` to include `CDN::internal()`
300
  $md5 = md5( $src );
301
 
302
- return LITESPEED_STATIC_DIR . '/lqip/remote/' . substr( $md5, 0, 1 ) . '/' . substr( $md5, 1, 1 ) . '/' . $md5 . '.' . $size;
303
  }
304
 
305
  // Drop domain
306
  $short_path = Utility::att_short_path( $src );
307
 
308
- return LITESPEED_STATIC_DIR . '/lqip/' . $short_path . '/' . $size;
309
 
310
  }
311
 
312
- /**
313
- * Delete file-based cache folder for LQIP
314
- *
315
- * @since 3.0
316
- * @access public
317
- */
318
- public function rm_lqip_cache_folder() {
319
- if ( self::has_lqip_cache() ) {
320
- File::rrmdir( LITESPEED_STATIC_DIR . '/lqip' );
321
- }
322
-
323
- // Clear LQIP in queue too
324
- self::save_summary( array() );
325
-
326
- Debug2::debug( '[LQIP] Cleared LQIP queue' );
327
- }
328
-
329
  /**
330
  * Cron placeholder generation
331
  *
@@ -335,7 +310,7 @@ class Placeholder extends Base {
335
  public static function cron( $continue = false ) {
336
  $_instance = self::cls();
337
 
338
- $queue = $_instance->_load_queue( 'lqip' );
339
 
340
  if ( empty( $queue ) ) {
341
  return;
@@ -352,7 +327,12 @@ class Placeholder extends Base {
352
  foreach ( $queue as $v ) {
353
  Debug2::debug( '[LQIP] cron job [size] ' . $v );
354
 
355
- $_instance->_generate_placeholder( $v );
 
 
 
 
 
356
 
357
  // only request first one
358
  if ( ! $continue ) {
@@ -383,7 +363,7 @@ class Placeholder extends Base {
383
  * @since 2.5.1
384
  * @access private
385
  */
386
- private function _generate_placeholder( $raw_size_and_src ) {
387
  // Parse containing size and src info
388
  $size_and_src = explode( ' ', $raw_size_and_src, 2 );
389
  $size = $size_and_src[ 0 ];
@@ -403,10 +383,16 @@ class Placeholder extends Base {
403
  $data = $this->_generate_placeholder_locally( $size );
404
  }
405
  else {
406
- $allowance = Cloud::cls()->allowance( Cloud::SVC_LQIP );
 
407
  if ( ! $allowance ) {
408
- Debug2::debug( '[LQIP] ❌ No credit' );
409
- Admin_Display::error( Error::msg( 'lack_of_quota' ) );
 
 
 
 
 
410
  return $this->_generate_placeholder_locally( $size );
411
  }
412
 
@@ -499,7 +485,7 @@ class Placeholder extends Base {
499
  * @since 3.0
500
  */
501
  private function _popup_and_save( $raw_size_and_src, $append_to_exc = false ) {
502
- $queue = $this->_load_queue( 'lqip' );
503
  if ( ! empty( $queue ) && in_array( $raw_size_and_src, $queue ) ) {
504
  unset( $queue[ array_search( $raw_size_and_src, $queue ) ] );
505
  }
@@ -526,23 +512,7 @@ class Placeholder extends Base {
526
  }
527
  }
528
 
529
- $this->_save_queue( 'lqip', $queue );
530
- }
531
-
532
- /**
533
- * Clear all waiting queues
534
- *
535
- * @since 3.4
536
- */
537
- public function clear_q() {
538
- $static_path = LITESPEED_STATIC_DIR . '/lqip/.litespeed_conf.dat';
539
-
540
- if ( file_exists( $static_path ) ) {
541
- unlink( $static_path );
542
- }
543
-
544
- $msg = __( 'Queue cleared successfully.', 'litespeed-cache' );
545
- Admin_Display::succeed( $msg );
546
  }
547
 
548
  /**
@@ -560,7 +530,7 @@ class Placeholder extends Base {
560
  break;
561
 
562
  case self::TYPE_CLEAR_Q :
563
- $this->clear_q();
564
  break;
565
 
566
  default:
250
  $tmp_placeholder = $this->_generate_placeholder_locally( $size );
251
 
252
  // Store it to prepare for cron
253
+ $queue = $this->load_queue( 'lqip' );
254
  if ( in_array( $arr_key, $queue ) ) {
255
  Debug2::debug2( '[LQIP] already in queue' );
256
 
264
  }
265
 
266
  $queue[] = $arr_key;
267
+ $this->save_queue( 'lqip', $queue );
268
  Debug2::debug( '[LQIP] Added placeholder queue' );
269
 
270
  return $tmp_placeholder;
271
  }
272
 
 
 
 
 
 
 
 
 
 
 
273
  /**
274
  * Generate realpath of placeholder file
275
  *
284
  $src = substr( $src, 0, -5 );
285
  }
286
 
287
+ $filepath_prefix = $this->_build_filepath_prefix( 'lqip' );
288
+
289
  // External images will use cache folder directly
290
  $domain = parse_url( $src, PHP_URL_HOST );
291
  if ( $domain && ! Utility::internal( $domain ) ) { // todo: need to improve `util:internal()` to include `CDN::internal()`
292
  $md5 = md5( $src );
293
 
294
+ return LITESPEED_STATIC_DIR . $filepath_prefix . 'remote/' . substr( $md5, 0, 1 ) . '/' . substr( $md5, 1, 1 ) . '/' . $md5 . '.' . $size;
295
  }
296
 
297
  // Drop domain
298
  $short_path = Utility::att_short_path( $src );
299
 
300
+ return LITESPEED_STATIC_DIR . $filepath_prefix . $short_path . '/' . $size;
301
 
302
  }
303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  /**
305
  * Cron placeholder generation
306
  *
310
  public static function cron( $continue = false ) {
311
  $_instance = self::cls();
312
 
313
+ $queue = $_instance->load_queue( 'lqip' );
314
 
315
  if ( empty( $queue ) ) {
316
  return;
327
  foreach ( $queue as $v ) {
328
  Debug2::debug( '[LQIP] cron job [size] ' . $v );
329
 
330
+ $res = $_instance->_generate_placeholder( $v, true );
331
+
332
+ // Exit queue if out of quota
333
+ if ( $res == 'out_of_quota' ) {
334
+ return;
335
+ }
336
 
337
  // only request first one
338
  if ( ! $continue ) {
363
  * @since 2.5.1
364
  * @access private
365
  */
366
+ private function _generate_placeholder( $raw_size_and_src, $from_cron = false ) {
367
  // Parse containing size and src info
368
  $size_and_src = explode( ' ', $raw_size_and_src, 2 );
369
  $size = $size_and_src[ 0 ];
383
  $data = $this->_generate_placeholder_locally( $size );
384
  }
385
  else {
386
+ $err = false;
387
+ $allowance = Cloud::cls()->allowance( Cloud::SVC_LQIP, $err );
388
  if ( ! $allowance ) {
389
+ Debug2::debug( '[LQIP] ❌ No credit: ' . $err );
390
+ $err && Admin_Display::error( Error::msg( $err ) );
391
+
392
+ if ( $from_cron ) {
393
+ return 'out_of_quota';
394
+ }
395
+
396
  return $this->_generate_placeholder_locally( $size );
397
  }
398
 
485
  * @since 3.0
486
  */
487
  private function _popup_and_save( $raw_size_and_src, $append_to_exc = false ) {
488
+ $queue = $this->load_queue( 'lqip' );
489
  if ( ! empty( $queue ) && in_array( $raw_size_and_src, $queue ) ) {
490
  unset( $queue[ array_search( $raw_size_and_src, $queue ) ] );
491
  }
512
  }
513
  }
514
 
515
+ $this->save_queue( 'lqip', $queue );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516
  }
517
 
518
  /**
530
  break;
531
 
532
  case self::TYPE_CLEAR_Q :
533
+ $this->clear_q( 'lqip' );
534
  break;
535
 
536
  default:
src/purge.cls.php CHANGED
@@ -15,6 +15,7 @@ class Purge extends Base {
15
  protected $_purge_related = false;
16
  protected $_purge_single = false;
17
 
 
18
  const X_HEADER = 'X-LiteSpeed-Purge';
19
  const DB_QUEUE = 'queue';
20
 
@@ -22,6 +23,7 @@ class Purge extends Base {
22
  const TYPE_PURGE_ALL_LSCACHE = 'purge_all_lscache';
23
  const TYPE_PURGE_ALL_CSSJS = 'purge_all_cssjs';
24
  const TYPE_PURGE_ALL_CCSS = 'purge_all_ccss';
 
25
  const TYPE_PURGE_ALL_LQIP = 'purge_all_lqip';
26
  const TYPE_PURGE_ALL_AVATAR = 'purge_all_avatar';
27
  const TYPE_PURGE_ALL_OBJECT = 'purge_all_object';
@@ -99,6 +101,10 @@ class Purge extends Base {
99
  $this->_purge_all_ccss();
100
  break;
101
 
 
 
 
 
102
  case self::TYPE_PURGE_ALL_LQIP:
103
  $this->_purge_all_lqip();
104
  break;
@@ -205,10 +211,9 @@ class Purge extends Base {
205
  private function _purge_all_ccss( $silence = false ) {
206
  do_action( 'litespeed_purged_all_ccss' );
207
 
208
- $this->cls( 'CSS' )->rm_cache_folder( $this->_is_subsite_purge() ? get_current_blog_id() : false );
209
 
210
  $this->cls( 'Data' )->url_file_clean( 'ccss' );
211
- $this->cls( 'Data' )->url_file_clean( 'ucss' );
212
 
213
  if ( ! $silence ) {
214
  $msg = __( 'Cleaned all Critical CSS files.', 'litespeed-cache' );
@@ -216,6 +221,25 @@ class Purge extends Base {
216
  }
217
  }
218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  /**
220
  * Delete all LQIP images
221
  *
@@ -225,7 +249,7 @@ class Purge extends Base {
225
  private function _purge_all_lqip( $silence = false ) {
226
  do_action( 'litespeed_purged_all_lqip' );
227
 
228
- Placeholder::cls()->rm_lqip_cache_folder();
229
 
230
  if ( ! $silence ) {
231
  $msg = __( 'Cleaned all LQIP files.', 'litespeed-cache' );
@@ -242,7 +266,7 @@ class Purge extends Base {
242
  private function _purge_all_avatar( $silence = false ) {
243
  do_action( 'litespeed_purged_all_avatar' );
244
 
245
- Avatar::cls()->rm_cache_folder( $this->_is_subsite_purge() ? get_current_blog_id() : false );
246
 
247
  if ( ! $silence ) {
248
  $msg = __( 'Cleaned all Gravatar files.', 'litespeed-cache' );
@@ -265,13 +289,14 @@ class Purge extends Base {
265
 
266
  $this->_add( Tag::TYPE_MIN );
267
 
268
- $this->cls( 'Optimize' )->rm_cache_folder( $this->_is_subsite_purge() ? get_current_blog_id() : false );
 
269
 
270
  $this->cls( 'Data' )->url_file_clean( 'css' );
271
  $this->cls( 'Data' )->url_file_clean( 'js' );
272
 
273
  // Clear UCSS queue as it used combined CSS to generate
274
- $this->cls( 'CSS' )->clear_q( 'ucss' );
275
 
276
  if ( ! $silence ) {
277
  $msg = __( 'Notified LiteSpeed Web Server to purge CSS/JS entries.', 'litespeed-cache' );
15
  protected $_purge_related = false;
16
  protected $_purge_single = false;
17
 
18
+
19
  const X_HEADER = 'X-LiteSpeed-Purge';
20
  const DB_QUEUE = 'queue';
21
 
23
  const TYPE_PURGE_ALL_LSCACHE = 'purge_all_lscache';
24
  const TYPE_PURGE_ALL_CSSJS = 'purge_all_cssjs';
25
  const TYPE_PURGE_ALL_CCSS = 'purge_all_ccss';
26
+ const TYPE_PURGE_ALL_UCSS = 'purge_all_ucss';
27
  const TYPE_PURGE_ALL_LQIP = 'purge_all_lqip';
28
  const TYPE_PURGE_ALL_AVATAR = 'purge_all_avatar';
29
  const TYPE_PURGE_ALL_OBJECT = 'purge_all_object';
101
  $this->_purge_all_ccss();
102
  break;
103
 
104
+ case self::TYPE_PURGE_ALL_UCSS:
105
+ $this->_purge_all_ucss();
106
+ break;
107
+
108
  case self::TYPE_PURGE_ALL_LQIP:
109
  $this->_purge_all_lqip();
110
  break;
211
  private function _purge_all_ccss( $silence = false ) {
212
  do_action( 'litespeed_purged_all_ccss' );
213
 
214
+ $this->rm_cache_folder( 'ccss' );
215
 
216
  $this->cls( 'Data' )->url_file_clean( 'ccss' );
 
217
 
218
  if ( ! $silence ) {
219
  $msg = __( 'Cleaned all Critical CSS files.', 'litespeed-cache' );
221
  }
222
  }
223
 
224
+ /**
225
+ * Delete all unique css
226
+ *
227
+ * @since 2.3
228
+ * @access private
229
+ */
230
+ private function _purge_all_ucss( $silence = false ) {
231
+ do_action( 'litespeed_purged_all_ucss' );
232
+
233
+ $this->rm_cache_folder( 'ucss' );
234
+
235
+ $this->cls( 'Data' )->url_file_clean( 'ucss' );
236
+
237
+ if ( ! $silence ) {
238
+ $msg = __( 'Cleaned all Unique CSS files.', 'litespeed-cache' );
239
+ ! defined( 'LITESPEED_PURGE_SILENT' ) && Admin_Display::succeed( $msg );
240
+ }
241
+ }
242
+
243
  /**
244
  * Delete all LQIP images
245
  *
249
  private function _purge_all_lqip( $silence = false ) {
250
  do_action( 'litespeed_purged_all_lqip' );
251
 
252
+ $this->rm_cache_folder( 'lqip' );
253
 
254
  if ( ! $silence ) {
255
  $msg = __( 'Cleaned all LQIP files.', 'litespeed-cache' );
266
  private function _purge_all_avatar( $silence = false ) {
267
  do_action( 'litespeed_purged_all_avatar' );
268
 
269
+ $this->rm_cache_folder( 'avatar' );
270
 
271
  if ( ! $silence ) {
272
  $msg = __( 'Cleaned all Gravatar files.', 'litespeed-cache' );
289
 
290
  $this->_add( Tag::TYPE_MIN );
291
 
292
+ $this->rm_cache_folder( 'css' );
293
+ $this->rm_cache_folder( 'js' );
294
 
295
  $this->cls( 'Data' )->url_file_clean( 'css' );
296
  $this->cls( 'Data' )->url_file_clean( 'js' );
297
 
298
  // Clear UCSS queue as it used combined CSS to generate
299
+ $this->clear_q( 'ucss' );
300
 
301
  if ( ! $silence ) {
302
  $msg = __( 'Notified LiteSpeed Web Server to purge CSS/JS entries.', 'litespeed-cache' );
src/root.cls.php CHANGED
@@ -19,7 +19,52 @@ abstract class Root {
19
  private static $_network_options = array();
20
 
21
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
 
23
  * Build the static filepath
24
  *
25
  * @since 4.0
@@ -33,18 +78,19 @@ abstract class Root {
33
  return $filepath_prefix;
34
  }
35
 
36
- /**
37
  * Load current queues from data file
38
  *
39
- * @since 4.1
 
40
  */
41
- protected function _load_queue( $type ) {
42
  $filepath_prefix = $this->_build_filepath_prefix( $type );
43
  $static_path = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';
44
 
45
  $queue = array();
46
  if ( file_exists( $static_path ) ) {
47
- $queue = json_decode( file_get_contents( $static_path ), true );
48
  }
49
 
50
  return $queue;
@@ -53,9 +99,10 @@ abstract class Root {
53
  /**
54
  * Save current queues to data file
55
  *
56
- * @since 4.1
 
57
  */
58
- protected function _save_queue( $type, $list ) {
59
  $filepath_prefix = $this->_build_filepath_prefix( $type );
60
  $static_path = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';
61
 
@@ -64,6 +111,24 @@ abstract class Root {
64
  File::save( $static_path, $data, true );
65
  }
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  /**
68
  * Load an instance or create it if not existed
69
  * @since 4.0
19
  private static $_network_options = array();
20
 
21
  /**
22
+ * Check if there is cache folder for that type
23
+ *
24
+ * @since 3.0
25
+ */
26
+ public function has_cache_folder( $type ) {
27
+ $subsite_id = is_multisite() && ! is_network_admin() ? get_current_blog_id() : '';
28
+
29
+ if ( file_exists( LITESPEED_STATIC_DIR . '/' . $type . '/' . $subsite_id ) ) {
30
+ return true;
31
+ }
32
+ return false;
33
+ }
34
+
35
+ /**
36
+ * Delete file-based cache folder for that type
37
+ *
38
+ * @since 3.0
39
+ */
40
+ public function rm_cache_folder( $type ) {
41
+ if ( ! $this->has_cache_folder( $type ) ) {
42
+ return;
43
+ }
44
+
45
+ $subsite_id = is_multisite() && ! is_network_admin() ? get_current_blog_id() : '';
46
+
47
+ File::rrmdir( LITESPEED_STATIC_DIR . '/' . $type . '/' . $subsite_id );
48
+
49
+ // Clear All summary data
50
+ $this->_summary = array();
51
+ self::save_summary();
52
+
53
+ if ( $type == 'ccss' || $type == 'ucss') {
54
+ Debug2::debug( '[CSS] Cleared ' . $type . ' queue' );
55
+ }
56
+ elseif ( $type == 'avatar' ) {
57
+ Debug2::debug( '[Avatar] Cleared ' . $type . ' queue' );
58
+ }
59
+ elseif ( $type == 'css' || $type == 'js' ) {
60
+ return;
61
+ }
62
+ else {
63
+ Debug2::debug( '[' . strtoupper( $type ) . '] Cleared ' . $type . ' queue' );
64
+ }
65
+ }
66
 
67
+ /**
68
  * Build the static filepath
69
  *
70
  * @since 4.0
78
  return $filepath_prefix;
79
  }
80
 
81
+ /**
82
  * Load current queues from data file
83
  *
84
+ * @since 4.1
85
+ * @since 4.3 Elevated to root.cls
86
  */
87
+ public function load_queue( $type ) {
88
  $filepath_prefix = $this->_build_filepath_prefix( $type );
89
  $static_path = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';
90
 
91
  $queue = array();
92
  if ( file_exists( $static_path ) ) {
93
+ $queue = json_decode( file_get_contents( $static_path ), true ) ?: array();
94
  }
95
 
96
  return $queue;
99
  /**
100
  * Save current queues to data file
101
  *
102
+ * @since 4.1
103
+ * @since 4.3 Elevated to root.cls
104
  */
105
+ public function save_queue( $type, $list ) {
106
  $filepath_prefix = $this->_build_filepath_prefix( $type );
107
  $static_path = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';
108
 
111
  File::save( $static_path, $data, true );
112
  }
113
 
114
+ /**
115
+ * Clear all waiting queues
116
+ *
117
+ * @since 3.4
118
+ * @since 4.3 Elevated to root.cls
119
+ */
120
+ public function clear_q( $type ) {
121
+ $filepath_prefix = $this->_build_filepath_prefix( $type );
122
+ $static_path = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';
123
+
124
+ if ( file_exists( $static_path ) ) {
125
+ unlink( $static_path );
126
+ }
127
+
128
+ $msg = __( 'Queue cleared successfully.', 'litespeed-cache' );
129
+ Admin_Display::succeed( $msg );
130
+ }
131
+
132
  /**
133
  * Load an instance or create it if not existed
134
  * @since 4.0
thirdparty/amp.cls.php CHANGED
@@ -17,13 +17,16 @@ class AMP {
17
  /**
18
  * @since 4.2
19
  */
20
- private static function maybe_amp( $amp_function ) {
21
  if ( is_admin() ) {
22
  return;
23
  }
24
  if ( ! isset( $_GET[ 'amp' ] ) && ( ! function_exists( $amp_function ) || ! $amp_function() ) ) {
25
  return;
26
  }
 
 
 
27
  ! defined( 'LITESPEED_NO_PAGEOPTM' ) && define( 'LITESPEED_NO_PAGEOPTM', true );
28
  ! defined( 'LITESPEED_NO_LAZY' ) && define( 'LITESPEED_NO_LAZY', true );
29
  ! defined( 'LITESPEED_NO_OPTM' ) && define( 'LITESPEED_NO_OPTM', true );
@@ -36,7 +39,16 @@ class AMP {
36
  * @since 4.2
37
  */
38
  public static function maybe_acc_mob_pages() {
39
- self::maybe_amp( 'ampforwp_is_amp_endpoint' );
 
 
 
 
 
 
 
 
 
40
  }
41
 
42
  /**
@@ -49,9 +61,10 @@ class AMP {
49
  */
50
  public static function preload() {
51
  add_action( 'wp', __CLASS__ . '::maybe_acc_mob_pages' );
 
52
 
53
  // amp_is_request() from AMP
54
- self::maybe_amp( 'amp_is_request' );
55
  // add_filter( 'litespeed_can_optm', '__return_false' );
56
  // do_action( 'litespeed_conf_force', API::O_OPTM_CSS_ASYNC, false );
57
  // do_action( 'litespeed_conf_force', API::O_MEDIA_LAZY, false );
17
  /**
18
  * @since 4.2
19
  */
20
+ private static function _maybe_amp( $amp_function ) {
21
  if ( is_admin() ) {
22
  return;
23
  }
24
  if ( ! isset( $_GET[ 'amp' ] ) && ( ! function_exists( $amp_function ) || ! $amp_function() ) ) {
25
  return;
26
  }
27
+
28
+ do_action( 'litespeed_debug', '[3rd] ❌ AMP disabled page optm/lazy' );
29
+
30
  ! defined( 'LITESPEED_NO_PAGEOPTM' ) && define( 'LITESPEED_NO_PAGEOPTM', true );
31
  ! defined( 'LITESPEED_NO_LAZY' ) && define( 'LITESPEED_NO_LAZY', true );
32
  ! defined( 'LITESPEED_NO_OPTM' ) && define( 'LITESPEED_NO_OPTM', true );
39
  * @since 4.2
40
  */
41
  public static function maybe_acc_mob_pages() {
42
+ self::_maybe_amp( 'ampforwp_is_amp_endpoint' );
43
+ }
44
+
45
+ /**
46
+ * Google AMP fix
47
+ *
48
+ * @since 4.2.0.1
49
+ */
50
+ public static function maybe_google_amp() {
51
+ self::_maybe_amp( 'amp_is_request' );
52
  }
53
 
54
  /**
61
  */
62
  public static function preload() {
63
  add_action( 'wp', __CLASS__ . '::maybe_acc_mob_pages' );
64
+ add_action( 'wp', __CLASS__ . '::maybe_google_amp' );
65
 
66
  // amp_is_request() from AMP
67
+ // self::maybe_amp( 'amp_is_request' );
68
  // add_filter( 'litespeed_can_optm', '__return_false' );
69
  // do_action( 'litespeed_conf_force', API::O_OPTM_CSS_ASYNC, false );
70
  // do_action( 'litespeed_conf_force', API::O_MEDIA_LAZY, false );
tpl/banner/ajax.php CHANGED
@@ -12,7 +12,7 @@ $url = htmlspecialchars_decode( $url ) ;
12
  <script>
13
  document.addEventListener( 'DOMContentLoaded', function( event ) {
14
  jQuery(document).ready( function() {
15
- jQuery.get( '<?php echo $url ?>' ) ;
16
  } ) ;
17
  } ) ;
18
  </script>
12
  <script>
13
  document.addEventListener( 'DOMContentLoaded', function( event ) {
14
  jQuery(document).ready( function() {
15
+ jQuery.get( '<?php echo $url; ?>' ) ;
16
  } ) ;
17
  } ) ;
18
  </script>
tpl/dash/dashboard.tpl.php CHANGED
@@ -29,9 +29,9 @@ $cloud_summary = Cloud::get_summary();
29
  $css_summary = CSS::get_summary();
30
  $placeholder_summary = Placeholder::get_summary();
31
 
32
- $ccss_count = count( $this->_load_queue( 'ccss' ) );
33
- $ucss_count = count( $this->_load_queue( 'ucss' ) );
34
- $placeholder_queue_count = count( $this->_load_queue( 'lqip' ) );
35
  ?>
36
 
37
  <div class="litespeed-dashboard">
@@ -122,6 +122,7 @@ $placeholder_queue_count = count( $this->_load_queue( 'lqip' ) );
122
  </div>
123
  </div>
124
  </div>
 
125
  <?php if ( $pag_total > 0 ) { ?>
126
  <p class="litespeed-dashboard-stats-payg <?php echo $pag_txt_color; ?>">
127
  <?php echo __('PAYG Balance','litespeed-cache'); ?>: <strong><?php echo $pag_bal; ?></strong>
@@ -153,6 +154,13 @@ $placeholder_queue_count = count( $this->_load_queue( 'lqip' ) );
153
  </p>
154
  <div class="clear"></div>
155
  <?php } ?>
 
 
 
 
 
 
 
156
  </div>
157
  </div>
158
  <?php endforeach; ?>
29
  $css_summary = CSS::get_summary();
30
  $placeholder_summary = Placeholder::get_summary();
31
 
32
+ $ccss_count = count( $this->load_queue( 'ccss' ) );
33
+ $ucss_count = count( $this->load_queue( 'ucss' ) );
34
+ $placeholder_queue_count = count( $this->load_queue( 'lqip' ) );
35
  ?>
36
 
37
  <div class="litespeed-dashboard">
122
  </div>
123
  </div>
124
  </div>
125
+
126
  <?php if ( $pag_total > 0 ) { ?>
127
  <p class="litespeed-dashboard-stats-payg <?php echo $pag_txt_color; ?>">
128
  <?php echo __('PAYG Balance','litespeed-cache'); ?>: <strong><?php echo $pag_bal; ?></strong>
154
  </p>
155
  <div class="clear"></div>
156
  <?php } ?>
157
+
158
+ <?php if ( isset( $usage[ 'remaining_daily_quota' ] ) && $usage[ 'remaining_daily_quota' ] >= 0 && isset( $usage[ 'daily_quota' ] ) && $usage[ 'daily_quota' ] >= 0 ) { ?>
159
+ <p class="litespeed-dashboard-stats-total">
160
+ <?php echo __('Remaining Daily Quota','litespeed-cache'); ?>: <strong><?php echo $usage[ 'remaining_daily_quota' ]; ?> / <?php echo $usage[ 'daily_quota' ]; ?></strong>
161
+ </p>
162
+ <div class="clear"></div>
163
+ <?php } ?>
164
  </div>
165
  </div>
166
  <?php endforeach; ?>
tpl/page_optm/settings_css.tpl.php CHANGED
@@ -8,8 +8,8 @@ defined( 'WPINC' ) || exit;
8
  $css_summary = CSS::get_summary();
9
  $closest_server = Cloud::get_summary( 'server.' . Cloud::SVC_CCSS );
10
 
11
- $ccss_queue = $this->_load_queue( 'ccss' );
12
- $ucss_queue = $this->_load_queue( 'ucss' );
13
  ?>
14
 
15
  <h3 class="litespeed-title-short">
@@ -64,7 +64,7 @@ $ucss_queue = $this->_load_queue( 'ucss' );
64
  <?php echo __( 'Use QUIC.cloud online service to generate unique CSS.', 'litespeed-cache' ); ?>
65
  <?php echo __( 'This will drop the unused CSS on each page from the combined file.', 'litespeed-cache' ); ?>
66
  <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/pageopt/#generate-ucss' ); ?><br />
67
- <?php echo __( 'Automatic generation of unused CSS is in the background via a cron-based queue.', 'litespeed-cache' ); ?>
68
  </div>
69
 
70
  <div class="litespeed-desc litespeed-left20">
8
  $css_summary = CSS::get_summary();
9
  $closest_server = Cloud::get_summary( 'server.' . Cloud::SVC_CCSS );
10
 
11
+ $ccss_queue = $this->load_queue( 'ccss' );
12
+ $ucss_queue = $this->load_queue( 'ucss' );
13
  ?>
14
 
15
  <h3 class="litespeed-title-short">
64
  <?php echo __( 'Use QUIC.cloud online service to generate unique CSS.', 'litespeed-cache' ); ?>
65
  <?php echo __( 'This will drop the unused CSS on each page from the combined file.', 'litespeed-cache' ); ?>
66
  <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/pageopt/#generate-ucss' ); ?><br />
67
+ <?php echo __( 'Automatic generation of unique CSS is in the background via a cron-based queue.', 'litespeed-cache' ); ?>
68
  </div>
69
 
70
  <div class="litespeed-desc litespeed-left20">
tpl/page_optm/settings_js.tpl.php CHANGED
@@ -75,7 +75,7 @@ defined( 'WPINC' ) || exit;
75
  <td>
76
  <?php $this->build_switch( $id, array( __( 'OFF', 'litespeed-cache' ), __( 'Deferred', 'litespeed-cache' ), __( 'Delayed', 'litespeed-cache' ) ) ); ?>
77
  <div class="litespeed-desc">
78
- <?php echo __( 'Doing so can help reduce resource contention and improve performance causing a lower FID (Core Web Vitals metric).', 'litespeed-cache' ); ?>
79
  <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/pageopt/#load-js-deferred' ); ?><br />
80
  <?php echo __( 'This can improve your speed score in services like Pingdom, GTmetrix and PageSpeed.', 'litespeed-cache' ); ?>
81
  <?php Doc::learn_more( 'https://web.dev/fid/#what-is-fid' ); ?>
75
  <td>
76
  <?php $this->build_switch( $id, array( __( 'OFF', 'litespeed-cache' ), __( 'Deferred', 'litespeed-cache' ), __( 'Delayed', 'litespeed-cache' ) ) ); ?>
77
  <div class="litespeed-desc">
78
+ <?php echo __( 'Deferring until page is parsed or delaying till interaction can help reduce resource contention and improve performance causing a lower FID (Core Web Vitals metric).', 'litespeed-cache' ); ?>
79
  <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/pageopt/#load-js-deferred' ); ?><br />
80
  <?php echo __( 'This can improve your speed score in services like Pingdom, GTmetrix and PageSpeed.', 'litespeed-cache' ); ?>
81
  <?php Doc::learn_more( 'https://web.dev/fid/#what-is-fid' ); ?>
tpl/page_optm/settings_media.tpl.php CHANGED
@@ -6,7 +6,7 @@ $placeholder_summary = Placeholder::get_summary();
6
 
7
  $closest_server = Cloud::get_summary( 'server.' . Cloud::SVC_LQIP );
8
 
9
- $placeholder_queue = $this->_load_queue( 'lqip' );
10
 
11
  ?>
12
 
@@ -176,15 +176,15 @@ $placeholder_queue = $this->_load_queue( 'lqip' );
176
  <a href="<?php echo Utility::build_url( Router::ACTION_CLOUD, Cloud::TYPE_REDETECT_CLOUD, false, null, array( 'svc' => Cloud::SVC_LQIP ) ); ?>" data-balloon-pos="up" data-balloon-break aria-label='<?php echo sprintf( __( 'Current closest Cloud server is %s.&#10; Click to redetect.', 'litespeed-cache' ), $closest_server ); ?>' data-litespeed-cfm="<?php echo __( 'Are you sure you want to redetect the closest cloud server for this service?', 'litespeed-cache' ) ; ?>"><i class='litespeed-quic-icon'></i></a>
177
  <?php endif; ?>
178
 
179
- <?php if ( ! empty( $placeholder_queue ) ) : ?>
180
  <div class="litespeed-callout notice notice-warning inline">
181
  <h4>
182
- <?php echo __( 'Size list in queue waiting for cron','litespeed-cache' ); ?>
183
  <a href="<?php echo Utility::build_url( Router::ACTION_PLACEHOLDER, Placeholder::TYPE_CLEAR_Q ); ?>" class="button litespeed-btn-warning litespeed-right">Clear</a>
184
  </h4>
185
  <p>
186
- <?php foreach ( $placeholder_queue as $k => $v ) : ?>
187
- <?php if ( $k > 20 ) : ?>
188
  <?php echo '...'; ?>
189
  <?php break; ?>
190
  <?php endif; ?>
6
 
7
  $closest_server = Cloud::get_summary( 'server.' . Cloud::SVC_LQIP );
8
 
9
+ $lqip_queue = $this->load_queue( 'lqip' );
10
 
11
  ?>
12
 
176
  <a href="<?php echo Utility::build_url( Router::ACTION_CLOUD, Cloud::TYPE_REDETECT_CLOUD, false, null, array( 'svc' => Cloud::SVC_LQIP ) ); ?>" data-balloon-pos="up" data-balloon-break aria-label='<?php echo sprintf( __( 'Current closest Cloud server is %s.&#10; Click to redetect.', 'litespeed-cache' ), $closest_server ); ?>' data-litespeed-cfm="<?php echo __( 'Are you sure you want to redetect the closest cloud server for this service?', 'litespeed-cache' ) ; ?>"><i class='litespeed-quic-icon'></i></a>
177
  <?php endif; ?>
178
 
179
+ <?php if ( ! empty( $lqip_queue ) ) : ?>
180
  <div class="litespeed-callout notice notice-warning inline">
181
  <h4>
182
+ <?php echo __( 'Size list in queue waiting for cron','litespeed-cache' ); ?> ( <?php echo count( $lqip_queue ); ?> )
183
  <a href="<?php echo Utility::build_url( Router::ACTION_PLACEHOLDER, Placeholder::TYPE_CLEAR_Q ); ?>" class="button litespeed-btn-warning litespeed-right">Clear</a>
184
  </h4>
185
  <p>
186
+ <?php $i=0; foreach ( $lqip_queue as $k => $v ) : ?>
187
+ <?php if ( $i++ > 20 ) : ?>
188
  <?php echo '...'; ?>
189
  <?php break; ?>
190
  <?php endif; ?>
tpl/page_optm/settings_media_exc.tpl.php CHANGED
@@ -21,6 +21,7 @@ defined( 'WPINC' ) || exit;
21
  <?php echo __( 'Listed images will not be lazy loaded.', 'litespeed-cache' ); ?>
22
  <?php Doc::full_or_partial_url(); ?>
23
  <?php Doc::one_per_line(); ?>
 
24
  <br /><font class="litespeed-success">
25
  <?php echo __( 'API', 'litespeed-cache' ); ?>:
26
  <?php echo sprintf( __( 'Filter %s is supported.', 'litespeed-cache' ), '<code>litespeed_media_lazy_img_excludes</code>' ); ?>
21
  <?php echo __( 'Listed images will not be lazy loaded.', 'litespeed-cache' ); ?>
22
  <?php Doc::full_or_partial_url(); ?>
23
  <?php Doc::one_per_line(); ?>
24
+ <br /><?php echo __( 'Useful for above-the-fold images causing CLS (a Core Web Vitals metric).', 'litespeed-cache' ); ?>
25
  <br /><font class="litespeed-success">
26
  <?php echo __( 'API', 'litespeed-cache' ); ?>:
27
  <?php echo sprintf( __( 'Filter %s is supported.', 'litespeed-cache' ), '<code>litespeed_media_lazy_img_excludes</code>' ); ?>
tpl/toolbox/beta_test.tpl.php CHANGED
@@ -4,8 +4,9 @@ defined( 'WPINC' ) || exit;
4
 
5
  // Existing public version list
6
  $v_list = array(
 
 
7
  '4.1',
8
- '3.6.4',
9
  );
10
 
11
  ?>
@@ -34,11 +35,18 @@ $v_list = array(
34
  <a href="javascript:;" class="button litespeed-btn-success" onclick="document.getElementById('litespeed-beta-test').value='<?php echo $v; ?>';"><?php echo $v; ?></a>
35
 
36
  <?php endforeach; ?>
 
 
 
 
 
37
  </p>
38
 
39
  <div class="litespeed-desc"><?php echo sprintf( __( 'Press the %s button to use the most recent GitHub commit. Master is for release candidate & Dev is for experimental testing.', 'litespeed-cache' ), '<code>' . __( 'Use latest GitHub Dev/Master commit', 'litespeed-cache' ) . '</code>' ); ?></div>
40
  <div class="litespeed-desc"><?php echo sprintf( __( 'Press the %s button to stop beta testing and go back to the current release from the WordPress Plugin Directory.', 'litespeed-cache' ), '<code>' . __( 'Use latest WordPress release version', 'litespeed-cache' ) . '</code>' ); ?></div>
41
 
 
 
42
  <p class="litespeed-danger">
43
  🚨 <?php echo sprintf( __( 'In order to avoid an upgrade error, you must be using %1$s or later before you can upgrade to %2$s versions.', 'litespeed-cache' ), '<code>v3.6.4</code>', '<code>dev/master/v4+</code>' ); ?>
44
  </p>
4
 
5
  // Existing public version list
6
  $v_list = array(
7
+ '4.3',
8
+ '4.2',
9
  '4.1',
 
10
  );
11
 
12
  ?>
35
  <a href="javascript:;" class="button litespeed-btn-success" onclick="document.getElementById('litespeed-beta-test').value='<?php echo $v; ?>';"><?php echo $v; ?></a>
36
 
37
  <?php endforeach; ?>
38
+
39
+ <a href="javascript:;" class="button litespeed-btn-danger" onclick="document.getElementById('litespeed-beta-test').value='3.6.4';">3.6.4</a>
40
+ <span class="litespeed-danger">
41
+ 🚨 <?php echo __( 'Downgrade not recommended. May cause fatal error due to refactored code.', 'litespeed-cache' ); ?>
42
+ </span>
43
  </p>
44
 
45
  <div class="litespeed-desc"><?php echo sprintf( __( 'Press the %s button to use the most recent GitHub commit. Master is for release candidate & Dev is for experimental testing.', 'litespeed-cache' ), '<code>' . __( 'Use latest GitHub Dev/Master commit', 'litespeed-cache' ) . '</code>' ); ?></div>
46
  <div class="litespeed-desc"><?php echo sprintf( __( 'Press the %s button to stop beta testing and go back to the current release from the WordPress Plugin Directory.', 'litespeed-cache' ), '<code>' . __( 'Use latest WordPress release version', 'litespeed-cache' ) . '</code>' ); ?></div>
47
 
48
+
49
+
50
  <p class="litespeed-danger">
51
  🚨 <?php echo sprintf( __( 'In order to avoid an upgrade error, you must be using %1$s or later before you can upgrade to %2$s versions.', 'litespeed-cache' ), '<code>v3.6.4</code>', '<code>dev/master/v4+</code>' ); ?>
52
  </p>
tpl/toolbox/purge.tpl.php CHANGED
@@ -65,7 +65,7 @@ if ( Router::opcache_enabled() ) {
65
  ) ;
66
  }
67
 
68
- if ( file_exists( LITESPEED_STATIC_DIR . '/ccss' ) ) {
69
  $_panels[] = array(
70
  'title' => __( 'Purge All', 'litespeed-cache' ) . ' - ' . __( 'Critical CSS', 'litespeed-cache' ),
71
  'desc' => __( 'This will delete all generated critical CSS files', 'litespeed-cache' ),
@@ -74,16 +74,25 @@ if ( file_exists( LITESPEED_STATIC_DIR . '/ccss' ) ) {
74
  ) ;
75
  }
76
 
77
- if ( Placeholder::has_lqip_cache() ) {
 
 
 
 
 
 
 
 
 
78
  $_panels[] = array(
79
  'title' => __( 'Purge All', 'litespeed-cache' ) . ' - ' . __( 'LQIP Cache', 'litespeed-cache' ),
80
  'desc' => __( 'This will delete all generated image LQIP placeholder files', 'litespeed-cache' ),
81
- 'icon' => 'purge-placeholder',
82
  'append_url' => Purge::TYPE_PURGE_ALL_LQIP,
83
  ) ;
84
  }
85
 
86
- if ( Avatar::has_cache() ) {
87
  $_panels[] = array(
88
  'title' => __( 'Purge All', 'litespeed-cache' ) . ' - ' . __( 'Gravatar Cache', 'litespeed-cache' ),
89
  'desc' => __( 'This will delete all cached Gravatar files', 'litespeed-cache' ),
65
  ) ;
66
  }
67
 
68
+ if ( $this->has_cache_folder( 'ccss' ) ) {
69
  $_panels[] = array(
70
  'title' => __( 'Purge All', 'litespeed-cache' ) . ' - ' . __( 'Critical CSS', 'litespeed-cache' ),
71
  'desc' => __( 'This will delete all generated critical CSS files', 'litespeed-cache' ),
74
  ) ;
75
  }
76
 
77
+ if ( $this->has_cache_folder( 'ucss' ) ) {
78
+ $_panels[] = array(
79
+ 'title' => __( 'Purge All', 'litespeed-cache' ) . ' - ' . __( 'Unique CSS', 'litespeed-cache' ),
80
+ 'desc' => __( 'This will delete all generated unique CSS files', 'litespeed-cache' ),
81
+ 'icon' => 'purge-cssjs',
82
+ 'append_url' => Purge::TYPE_PURGE_ALL_UCSS,
83
+ ) ;
84
+ }
85
+
86
+ if ( $this->has_cache_folder( 'lqip' ) ) {
87
  $_panels[] = array(
88
  'title' => __( 'Purge All', 'litespeed-cache' ) . ' - ' . __( 'LQIP Cache', 'litespeed-cache' ),
89
  'desc' => __( 'This will delete all generated image LQIP placeholder files', 'litespeed-cache' ),
90
+ 'icon' => 'purge-front',
91
  'append_url' => Purge::TYPE_PURGE_ALL_LQIP,
92
  ) ;
93
  }
94
 
95
+ if ( $this->has_cache_folder( 'avatar' ) ) {
96
  $_panels[] = array(
97
  'title' => __( 'Purge All', 'litespeed-cache' ) . ' - ' . __( 'Gravatar Cache', 'litespeed-cache' ),
98
  'desc' => __( 'This will delete all cached Gravatar files', 'litespeed-cache' ),