Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
litespeed_wiki:cache:lscwp:troubleshooting:php_session_and_cache [2018/06/24 16:15] qtwrk |
litespeed_wiki:cache:lscwp:troubleshooting:php_session_and_cache [2020/11/14 15:43] (current) Lisa Clarke Redirect to new Documentation Site |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Page depends on PHP session doesn't work with LiteSpeed Cache ====== | + | ~~REDIRECT>https://docs.litespeedtech.com/lscache/lscwp/troubleshoot/~~ |
- | + | ||
- | ===== Symptom and behavior: ===== | + | |
- | + | ||
- | Some plugin as WHMpress that uses PHP session to store values (currency, language...etc), the selection doesn't work with LiteSpeed Cache. | + | |
- | + | ||
- | Once enabled LiteSpeed Cache, user depended value like currency will not work or display correctly. | + | |
- | + | ||
- | ===== Cause: ===== | + | |
- | + | ||
- | A page content depends on PHP session is not cache-friendly, once cached page is generated , it will not vary on session data. | + | |
- | + | ||
- | As LiteSpeed Cache is designed to avoid hit PHP backend, therefore there is no way for cache module to know what value it is stored in PHP session. | + | |
- | + | ||
- | ===== Solution: ===== | + | |
- | + | ||
- | To make this to work , it will require code change in plugin to make it store values in cookie and set LiteSpeed Cache to [[litespeed_wiki:cache:developer_guide:cache-vary|vary on cookie]]. | + | |
- | + | ||
- | + |