• Resolved aliahmari

    (@aliahmari)


    Hello there

    Is there any way of not deleting older css js files which is made by lscache?

    If older files be stored about 30 days it would be great because some of the time we get 404 error for those files because of using CDN

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

    (@qtwrk)

    are you talking about 3rd party CDN ?

    the JS/CSS should be linked with page cache , when you purge all , they all get purged , so new page cache will link to new JS/CSS

    Thread Starter aliahmari

    (@aliahmari)

    No, I’m talking about local css and js files that combine into one file. Because of some cache rules in CDN (private CDN), in some pages it’s possible to get 404 error for css and js files.

    Is it possible to keep older css and js files for a while?

    Plugin Support qtwrk

    (@qtwrk)

    sadly no , JS/CSS has dynamic file name based on its content , and was not meant to work with any other CDN system , as it needs update page cache and JS/CSS files simultaneously

    but if you are using some kind of CDN, once JS/CSS is CDN-cached , how about prolong that cache in CDN servers ?

    Thread Starter aliahmari

    (@aliahmari)

    I do not have any access in changing cache rule in CDN server like increasing the time of expiring cached file because of that, I wanted to know that is there any way to not delete css and js file in ls cache plugin (it’s ok to change the name of the css and js file but it would be great if the older one not be deleted)

    Plugin Support qtwrk

    (@qtwrk)

    sadly no

    best way you can do is to edit this line https://github.com/litespeedtech/lscache_wp/blob/ce40aeeeeeae579e0f98d4fe0dbb2f8ad9fb4af5/src/purge.cls.php#L345 , add a return; below it to stop delete , but it will be overridden upon plugin upgrade.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Is there any way of not deleting older css js files’ is closed to new replies.