Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter foundbutlost

    (@foundbutlost)

    Yes, i have all the server access. I own my server. is it possible to do it through PHP script?

    Thread Starter foundbutlost

    (@foundbutlost)

    If i’m using JS, it would not going smooth and resulting bad experience to user. There is a flashing white for a sec if i’m using js. There is way by just using JS, but cache would ruined it. I don’t have any report number as for now. as i said i was just wondering if there is a way to modify the cache content before output it to browser.

    Thread Starter foundbutlost

    (@foundbutlost)

    Ah i thought api was the only way to add the cache tags. so apparently i can use this response header method too. i didnt see it, glad you pointed it out. Thank you so much for all the help :). Thread resolved.

    Thread Starter foundbutlost

    (@foundbutlost)

    Okay, it’s working now. The problem is i need to find a suitable action to hook on where i put the code. It will not works if i just put it straight to my single template file or function.php (without suitable hook). 2 more questions:

    1. When i purged a post with a custom tags, i can see the custom tags would also got deleted. Did this behaviour correct? so i need to add the custom tag again every time after i purged the correlated post?

    2. What is the characters allowance on the cache tag name? Is space allowed? because i see on the example and default tags it only uses period(.) as a delimiter.

    Thread Starter foundbutlost

    (@foundbutlost)

    <!-- Page optimized by LiteSpeed Cache @2019-10-21 13:15:26 -->
    <!-- Page generated by LiteSpeed Cache 2.9.8.7 on 2019-10-21 20:15:26 -->
    <!-- X-LiteSpeed-Cache-Control: public,max-age=604800 -->
    <!-- X-LiteSpeed-Tag: 6d2_post,6d2_URL.25baa4c32b2e2d7185753cb00145291c,6d2_Po.1708,6d2_ -->
    <!-- Object Cache  [total] 4179 [hit_incall] 4052 [hit] 113 [miss_incall] 10 [miss] 4 [set] 4 -->

    So apparently i can’t see it while i’m logged in as admin. But still, it’s not working. The tags is not there.

    Can you please just give me a hint where i can use this API LiteSpeed_Cache_API::tag_add($tags); in order for it to work?

    Is it only possible to add tags when a post is published or updated? How do i add tags to an existing post without updating them one by one?

    Thread Starter foundbutlost

    (@foundbutlost)

    I didnt see any of that. there is only this two line on my html source `<!– Page optimized by LiteSpeed Cache @2019-10-21 02:40:57 –>
    <!– Page generated by LiteSpeed Cache 2.9.8.7 on 2019-10-21 09:40:57 –>`

    Anyway i dont think you get my point. I meant the public cache.

    I have 10 posts under same custom taxonomy called “Book”. now i want to add tag to all of these 10 posts so if i added a new post, i can automatically purge them by custom tag. it would be great if there is another parameter to pass the post id like `LiteSpeed_Cache_API::tag_add( [“Book.Red”], $post_id );

Viewing 6 replies - 1 through 6 (of 6 total)