• Resolved myilraj05

    (@myilraj05)


    Dear Team,
    I would like to increase the cache time for static assets of LiteSpeed Plugin to at least 1 Week.
    My Second Query is to set cache for Two Days for Dynamic Assets like PHP, HTML files.
    Kindly explain the procedures to set the same. Below is my HTACCESS code.

    # BEGIN LSCACHE
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* – [E=Cache-Control:no-autoflush]

    ### marker CACHE RESOURCE start ###
    RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php – [E=cache-control:max-age=3600]
    ### marker CACHE RESOURCE end ###

    ### marker FAVICON start ###
    RewriteRule favicon\.ico$ – [E=cache-control:max-age=86400]
    ### marker FAVICON end ###

    ### marker WEBP start ###
    RewriteCond %{HTTP_ACCEPT} “image/webp” [or]
    RewriteCond %{HTTP_USER_AGENT} “Page Speed”
    RewriteRule .* – [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
    ### marker WEBP end ###

    Regards,
    Myilraj.G

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    1. LiteSpeed cache won’t cache static resources.

    2.

    set cache for Two Days for Dynamic Assets like PHP, HTML files.

    you mean the site’s page? then please go to Cache —> TTL —> Default Public Cache TTL

    Best regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Need Help With Caching PHP/HTML files’ is closed to new replies.