Plugin Support
qtwrk
(@qtwrk)
Hi,
How does the price changes ? by itself ? I assume some cron job in place or something ?
Best regards,
exactly, its a dropshipping site, so with each update it checks the origin price and local price and syncs them up
Plugin Support
qtwrk
(@qtwrk)
Hi,
then when you sync it , you can call a purge API
https://docs.litespeedtech.com/lscache/lscwp/api/#purge
Best regards,
isnt there a way to not cache the price field at all, in the excludes ?
-
This reply was modified 2 years, 11 months ago by a7medo778.
Plugin Support
qtwrk
(@qtwrk)
Hi,
well , if you have looked through that doc
you will find
do_action( 'litespeed_purge_url', '/my-product/page' );
do_action( 'litespeed_purge_post', $post_id );
do_action( 'litespeed_purge_posttype', 'product' );
you can use first one to purge by URL , if your sync process have one
second one to purge by product ID , you can pass in by $post_id
or 3rd one , purge all “product” page once sync process is done
——-
technically yes
https://docs.litespeedtech.com/lscache/lscwp/api/#generate-esi-block-url
but this will require a lot of more custom code to implement ESI block
a purge call will be simpler solution
Best regards,
-
This reply was modified 2 years, 11 months ago by qtwrk.
hey mate, thanks for replying again
i did which is why I edited my reply to ask if I can just not cache the price field
Plugin Support
qtwrk
(@qtwrk)
yes, I edited my reply as well : )