• Resolved Mauro

    (@maurovic)


    I set up the TTL to one year, but when I use PageSpeed, it reports that it’s set to one week. I checked, and indeed, it shows one week in the HTML, even though it’s set up for one year in the LiteSpeed settings.

    I’ve purged the cache, UCSS, CCSS, purge ALL, uninstalled the plugin, reinstalled it, and nothing works. Even when programmed for one year (31557600s), the HTML still reflects only one week (7 days = 604800s).

    Here some images:
    Setup
    html
    PageSpeed

    Has anyone experienced something similar or have any suggestions on how to resolve this issue?

    I appreciate any help in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support qtwrk

    (@qtwrk)

    none of our plugin’s setting will affect cache-control header , it’s for browser cache

    SetEnvIf Request_URI "/$" dynamic_resources
    Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0" env=dynamic_resources
    
    SetEnvIf Request_URI "\.[^/]+$" static_resources
    Header set Cache-Control "public,max-age=31536000" env=static_resources

    you can add this to your .htaccess, it will set static with 365 days of public cache , and set no-cache on dynamic pages.

    • This reply was modified 10 months, 3 weeks ago by qtwrk.
    • This reply was modified 10 months, 3 weeks ago by qtwrk.
    Thread Starter Mauro

    (@maurovic)

    Qtwrk, thank you so much for the extremely fast assistance. From what I understand, the LiteSpeed TTL settings are for our server cache and not for the visitor’s browser cache, is that correct?

    If that’s the case, I’d like to suggest that in future plugin updates, you consider adding an option for us to control the browser cache expiration time. This way, we can eliminate the PageSpeed warning to extend the cache lifespan.

    I want to express my gratitude once again and congratulate you on the excellent work you are doing with the plugin and the support provided here on the forum, always prompt and helpful.

    Best regards,
    Mauro

    Hi @maurovic,

    Isn’t Cache -> Browser -> Browser Cache TTL wat you are looking for in this case?

    Thread Starter Mauro

    (@maurovic)

    Hello @mmwbadmin,

    I appreciate your suggestion. However, I have never changed the default value of the browser cache TTL, which is set to 31557600 (52 weeks 1 day 6 hours).

    In any case, thank you again for your interest in helping.

    Mauro.

    Plugin Support qtwrk

    (@qtwrk)

    my previous rule is problematic , better to use this one

    SetEnvIf Request_URI ".(js|css|jpg|png|webp|jpeg)$" static_resources

    and add more extension into the list if needed

    Thread Starter Mauro

    (@maurovic)

    @qtwrk, thank you for your response.

    Unfortunately, it didn’t work. I’m not a programmer, so it’s possible that I’m not entering the code correctly, as I’ve tried various solutions I found on the internet before posting the question here, and nothing seems to work.

    Anyway, I’ve spent about 5 days reading websites, forums, and the official LSCache documentation trying to solve this and other issues, which has taken up a lot of my time.

    I managed to resolve some problems, but this particular issue is proving to be more challenging than expected. Therefore, I’ll leave it as it is for now since I have limited time to work on it at the moment. I’ll come back to it and make new attempts later.

    I have another question, but I’ll create a new topic to avoid cluttering this one with unrelated matters.

    Regardless, I want to express my gratitude for your suggestions and support.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘TTL not working as intended’ is closed to new replies.