openlitespeed cache without plugin not work

#41
but if i edit this line
RewriteRule .* - [E=cache-control:max-age=120]
to be
RewriteRule .* - [E=cache-control: private,max-age=120]

x-LiteSpeed-cache : unset from header
 

LiteCache

Active Member
#42
You can only actually debug the problem if you have ruled out all conceivable sources of interference and that inevitably includes the CDN.

Even if you have solved the login problem, there are still much bigger problems that are even more difficult to solve. So I just ask you one question:

Imagine a registered user does not log out, but comes back in 30 minutes. It still has the login cookie, but in the absence of PHP for cached content, you cannot check whether the user is actually still logged in. How will you solve this?
 
#43
You can only actually debug the problem if you have ruled out all conceivable sources of interference and that inevitably includes the CDN.

Even if you have solved the login problem, there are still much bigger problems that are even more difficult to solve. So I just ask you one question:

Imagine a registered user does not log out, but comes back in 30 minutes. It still has the login cookie, but in the absence of PHP for cached content, you cannot check whether the user is actually still logged in. How will you solve this?
in my chat app, any user has cookies so the session not destroy, and if the user clicks logout so cookies will be unset and the session destroyed
 
#45
with this rules no x-litespeed-cache : miss/hit

<IfModule litespeed>
CacheLookup on
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/admin/ [NC]
RewriteRule .* - [E=Cache-Control:no-cache]

RewriteCond %{HTTP_COOKIE} (bc_lang|bc_userid|bc_utk) [NC]
RewriteRule .* - [E=cache-control: private,max-age=120]

RewriteRule .* - [E=cache-control:max-age=120]
#In order for the cache vary to work, the language cookie must be set.
RewriteCond %{HTTP_COOKIE} ^bc_lang [NC]
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+lang]
</IfModule>
 

LiteCache

Active Member
#46
with this rules no x-litespeed-cache : miss/hit

<IfModule litespeed>
CacheLookup on
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/admin/ [NC]
RewriteRule .* - [E=Cache-Control:no-cache]

RewriteCond %{HTTP_COOKIE} (bc_lang|bc_userid|bc_utk) [NC]
RewriteRule .* - [E=cache-control: private,max-age=120]

RewriteRule .* - [E=cache-control:max-age=120]
#In order for the cache vary to work, the language cookie must be set.
RewriteCond %{HTTP_COOKIE} ^bc_lang [NC]
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+lang]
</IfModule>
Where do you use these rules? https://www.arabchat.mobi/?

I still see CDN headers at https://www.arabchat.mobi/
 

LiteCache

Active Member
#47
in my chat app, any user has cookies so the session not destroy, and if the user clicks logout so cookies will be unset and the session destroyed
The session may exists, but if a page is cached you can't check if session exists. A cached page is just plain text and with plain text you can't run PHP, so your thinking is wrong. There are ways to check this anyway, but with OLS those options are severely limited and not safe. Also, don't rely on every user actually logging out. 1 user who does not log out is enough to create chaos.
 
Top