nando4
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] ESI Widget stops working after several hoursThank you. Got an email confirmation ??
Forum: Plugins
In reply to: [LiteSpeed Cache] ESI Widget stops working after several hoursThank you. Have sent an email linking to this topic a few days ago.
I have yet to receive a reply or ticket number. Is that something that this email node provides?
Would appreciate having some acknowledgement of receiving the bug report email and some method to track if it’s being addressed.
Confirm that method works. Thank you.
With regards to purging the ESI block, your code you supplied earlier worked when I created an exec widget in WP, place it on a test page, then opened that page using a browser:
<?php require( './wp-load.php' ); do_action( 'litespeed_purge', 'ESI.widget' );
However, when I create this as a php file on the server, and run it as su or user under which WP runs “php file.php”, it doesn’t purge the block. This may also explain why ‘wp litespeed-purge tag [tag]’ doesn’t work either.
Can you confirm this works on your environment when run using php at a server prompt?
Nevermind.. found some problems with my understanding of the caching. Thank you for your help.
Thank you. I am overriding it to a higher value by modding the PHP code to accept a larger value. Though doesn’t it seem odd that I can’t just enter the Private TTL as required in the field to do so without it arbitrarily limiting me to 60-360 seconds?
In my case I set:
- cached logged in users: off
- Force Cache URIs : list of URLs to cache (these are AFAIK private cache which doesn’t serve individual users but ALL users in a role group)
So with max private TTL of 360, after 1 hour my private cache that serves many users in a role group expires and needs to be regenerated, which for 120 webpages, requires a resource spike to do and is completely unnecessary. I could do with a 4 week TTL and save CPU and disk resources regenerating those pages every hour.
- with Private TTL=4 weeks, 1 site regeneration
- with Private TTL=1 hour, 24 x 7 x 4 = 672 site regenerations
So here, I present why the private TTL option should be allowed to be a user defined range much like the public TTL as 60-360s, is in my case, is a significant performance hinderance.
- This reply was modified 1 year, 6 months ago by nando4.
Appreciate your good work in confirming my observations. Will keep an eye out for a LS plugin update.
Or maybe you can ask the devs fix these issue with ESI shortcode tagging ESI blocks and being able to purge them. Ie:
- update the ESI shortcode to add postID of post/page it is in into the ESI block tag
- fix LS WP Admin panel -> Purge Page to purge ESI blocks with same post ID in it?
- fix ‘wp litespeed-purge post_id [post_id]’ CLI interface to do the same
- fix ‘wp litespeed-purge url [url]’ CLI to do the same
- fix ‘wp litespeed-purge tag [tag]’ CLI to allow purge of a ESI tag
Have had no luck adding your suggested code, copied below with my shortcode name, to my functions.php to allow me to change the tag of the ESI block.
add_action('litespeed_esi_shortcode-my_echo', function() {
do_action('litespeed_tag_add', get_the_ID());
});Maybe you can double-check what I am doing to confirm it’s correct?
- add a my_echo shortcode to my functions.php:
add_shortcode('my_echo', 'my_echo_shortcode');
function my_echo_shortcode($params) {
echo ' . implode(' ', $params) . '';
}2. add an ESI prefix to call my shortcode on my page:shortcode:
[ESI my_echo "hello there" ttl="9999999"]
The LS debugged output after the shortcode output shows the tags associated with the ESI block. The postID is not in there.
<div style="background: blue; color: white; text-align: center;">hello there</div> <!-- Block cached by LiteSpeed Cache 5.5.1 on 2023-08-09 10:46:12 --> <!-- X-LiteSpeed-Cache-Control: public,no-vary,max-age=99999 --> <!-- X-LiteSpeed-Tag: 3a6_HTTP.200,3a6_ESI,3a6_ESI.esi,3a6_ESI.esi.my_echo,3a6_ -->
I did manage to get the tagged ESI block by adding my_echo_shortcode:
function my_echo_shortcode($params) {
echo '' . implode(' ', $params) . '';
do_action('litespeed_add_tag', get_the_id());
}The LS debugged output shows the postID in the X-LiteSpeed-Tag correctly below:
<div style="background: blue; color: white; text-align: center;">hello there</div> <!-- Block cached by LiteSpeed Cache 5.5.1 on 2023-08-09 11:08:03 --> <!-- X-LiteSpeed-Cache-Control: public,no-vary,max-age=99999 --> <!-- X-LiteSpeed-Tag: 3a6_HTTP.200,3a6_ESI,3a6_ESI.esi,3a6_ESI.esi.my_echo,3a6_33565,3a6_ -->
Which now begs the question:
how can I tag a ESI shortcode that calls other author’s shortcodes rather than my own where I’ve added ‘
do_action('litespeed_add_tag', get_the_id());
‘?Thank you, can confirm that above code purges my ESI block so the next access to the page runs a new instance of it. Though it raises two points:
- How can I designate a more appropriate tag I can work with rather than the ESI shortcode assigns? , eg: tag the ESI block with the post-ID the ESI block lives on? Is there filter code that can be added to functions.php so ALL ESI shortcodes do that?
- For my testing/prototyping ESI, it seems a critical oversight in the WP LS cache dashboard, admin bar and CLI interface to not have a mechanism to clear ESI blocks requiring the above code or Purge All to do so. Can an enhancement request be added for this, eg: purge page including ESI blocks.
I only by accident discovered that altering the widget’s ESI block parameters and saving the widget ensures that ESI blocked widget gets purged and re-run on the page it lives on.
Thank you for the confirmation.
There was an error in my testing, so issue isn’t as titled. There still remains an anomoly in how a ESIed Widget vs ‘esi’ shortcode works deserved of a new support query.
Sure.. It is:
ADBlocker Ultimate
Version: 3.7.28
? 2016-2023 AdAvoid Ltd. All Rights Reserved.Love your diligence in smoothing out the CSV import process for me.
Have done more testing and found the reason the AALink “Advanced Options” was not expanding to show the Title field in Firefox was due to Ad-blocking plugins. So just need to temporarily disable the plugin to gain access to that field in whichever browser I am using.
Thank you. Great news.. latest plugin now again shows title hover text of CSV imported AAlinks. I can forego the workaround. Appreciate you nailing it ??
Also found that Chrome does expand the Advanced Option in admin panel, but FireFox doesn’t. There is no console javascript error in FireFox.
To answer your question, I generate a CSV from an Excel spreadsheet from data entered, then import it into AALinks. I do not use the export CSV function in AALinks.