Disable PHP caching

Disable PHP caching

Sometimes on hostings PHP opcache caching is enabled by default. Edits were made in the code, but on the site everything is displayed as before...

To reset the cache, you can call the PHP function:

opcache_reset();
PHP

Or disable it completely in haccess.

php_value opcache.revalidate_freq 0
htaccess
21.03.2019, updated 21.02.2021
56

Comments

to add a comment.

Other publications

Generating the sitemap.xml file
An example of creating a sitemap file (sitemap.xml) in PHP. Integrating it into the site and connecting it to robots.txt
34
0
Regular Expression Shortcodes
Often on sites, it becomes necessary to insert dynamic information blocks into the texts of pages - banners, phones...
25
0
Checking data with regular expressions
A collection of regular expressions with examples in PHP for validating data from form fields.
49
0
Automatic setting of the user's time zone
date_default_timezone_set sets the default timezone used by all date / time functions.
112
0
Serialize function, possible problems
The serialize () function returns a string representation of any value (array, object, etc.). Using serialize on an...
31
0
Examples of using cURL in PHP
cURL PHP is a library for receiving and transmitting data via protocols such as HTTP, FTP, HTTPS. The library is used...
316
0