Author Topic: PHP File cache  (Read 1777 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
PHP File cache
« on: August 25, 2022, 07:29:50 PM »
Hello

I am an newbie and i want to learn php.

I have CWP 7 installed with PHP 8.1.

I am trying to make an php script that connects to sql...this is not really important.
The problem that i have is this:

Every time i edit an php file and save it...it will not refresh on my browser. After about 60-70 seconds...it will refresh.
This is verry anoying because i don't really have good skills in php and most of the work i do is trial and error.

Can someone explain to me why this is happening and what can i do to refreh php site instant?

html file does not have this problem.

Thank you

Offline
*
Re: PHP File cache
« Reply #1 on: August 29, 2023, 11:53:39 AM »
I have the same problem. Did you manage to solve it?

Update

I guess disabling the cache should help.
/opt/alt/php-fpm74/usr/php/php.d/opcache.ini
« Last Edit: August 29, 2023, 12:46:36 PM by LexBart »

Online
****
Re: PHP File cache
« Reply #2 on: August 29, 2023, 02:16:23 PM »
You can disable opcache in your relevant php.ini for your version of php:

Code: [Select]
opcache.enable = 0
Or you can selectivel set opcache_reset() at head of your php script.