cache rewrite rule question

Discussion in 'General OpenLiteSpeed Discussion' started by adz, Oct 10, 2018 at 7:52 AM.

  1. adz

    adz New Member

    is this rewrite rule okay to add even if we already have the LScache module + WP LS cache plugin
    Code:
    RewriteRule cacheable/(.*\.php)?$ - [L,E=cache-control:max-age=120]
    cheers
     
  2. lskagan

    lskagan Administrator

    Yes, as long as those files are not handled by WordPress it should be fine.
     
    adz likes this.
  3. adz

    adz New Member

    thanks admin,
    should i leave public and private to 0? i do have the LS wp plugin though
    Code:
    enableCache 0
    enablePrivateCache 0
     
  4. Pong

    Pong Administrator

    Yes, you are right. WordPress cache will be controlled by LSWCP.

    If you set the following on server level
    enableCache 1
    enablePrivateCache 1
    It means enable cache for all domains and URLs(including Admin URLs) blindly and globally, it may break a lot of stuff, which is not recommended at all.

    Always set to the following and let LSWCP or other LSCache plugin to handle cache:
    enableCache 0
    enablePrivateCache 0
     
    Last edited: Oct 12, 2018 at 5:07 PM
    adz likes this.

Share This Page