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
67

Comments

to add a comment.

Other publications

Regular Expression Shortcodes
Often on sites, it becomes necessary to insert dynamic information blocks into the texts of pages - banners, phones...
36
0
Checking data with regular expressions
A collection of regular expressions with examples in PHP for validating data from form fields.
66
0
Automatic setting of the user's time zone
date_default_timezone_set sets the default timezone used by all date / time functions.
126
0
Serialize function, possible problems
The serialize () function returns a string representation of any value (array, object, etc.). Using serialize on an...
47
0
How to set up Last-Modified
The Last-Modified header helps to optimize the loading of web pages and make the job easier for search engines.
134
0
How to find out if a request came via AJAX
To distinguish between direct and AJAX requests, simply check the value of the $ _SERVER global variable
78
0