rand() and str_suffle() it's not working while enable the cache

#1
hello,

rand() and str_suffle(), If I execute this function same output is coming until cache clearing the cache. If disable the cache it's working properly.

Is there any alternative way to solve the issue?



[root@server~]# /usr/local/lsws/bin/lshttpd -v
LiteSpeed/1.7.13 Open
module versions:
modgzip 1.1
cache 1.62
modinspector 1.1
uploadprogress 1.1
mod_security 1.4
(built: Tue Aug 24 15:39:18 UTC 2021)
module versions:
modgzip 1.1
cache 1.62
modinspector 1.1
uploadprogress 1.1
mod_security 1.4
 

Attachments

Cold-Egg

Administrator
#2
I am not sure which kind of CMS you are using, the cached page will not process the PHP and MySQL again, that's how cache works. To avoid it, you can either disable cache for this page or make the code into JS code.
 
#3
thanks for your response,

Is there any alternative way to short this issue, Because we can't disable the cache for the entire domain and moreover we are using various CMS so we can't able to switch PHP function to JS code.
 
Top