Query: wincache_refresh_if_changed
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
WINCACHE_REFRESH_IF_CHANGED(3) 1 WINCACHE_REFRESH_IF_CHANGED(3) wincache_refresh_if_changed - Refreshes the cache entries for the cached filesSYNOPSISbool wincache_refresh_if_changed ([array $files = NULL])DESCRIPTIONRefreshes the cache entries for the files, whose names were passed in the input argument. If no argument is specified then refreshes all the entries in the cache.PARAMETERSo $files - An array of file names for files that need to be refreshed. An absolute or relative file paths can be used.RETURN VALUESReturns TRUE on success or FALSE on failure.EXAMPLESWinCache performs regular checks on the cached files to ensure that if any file has changed then the corresponding entry in the cache is updated. By default this check is performed every 30 seconds. If, for example, a PHP script updates another PHP script where the applica- tion's configuration settings are stored, then it may happen that after the configuration settings have been saved to a file, the applica- tion is still using old settings for some time until the cache is refreshed. In those cases it may be preferrable to refresh the cache right after the file has been changed. The following example shows how this can be done. Example #1 A wincache_refresh_if_changed(3) example <?php $filename = 'C:inetpubwwwrootconfig.php'; $handle = fopen($filename, 'w+'); if ($handle === FALSE) die('Failed to open file '.$filename.' for writing'); fwrite($handle, '<?php $setting=something; ?>'); fclose($handle); wincache_refresh_if_changed(array($filename)); ?>SEE ALSOwincache_fcache_fileinfo(3), wincache_fcache_meminfo(3), wincache_ocache_fileinfo(3), wincache_ocache_meminfo(3), wincache_rplist_file- info(3), wincache_rplist_meminfo(3), wincache_ucache_meminfo(3), wincache_ucache_info(3). PHP Documentation Group WINCACHE_REFRESH_IF_CHANGED(3)
Related Man Pages |
---|
fread(3) - php |
fwrite(3) - php |
mysqlnd_qc_get_query_trace_log(3) - php |
wincache_lock(3) - php |
wincache_ucache_info(3) - php |
Similar Topics in the Unix Linux Community |
---|
Installing PHP on Solaris (Express) Error |
PHP File Renamer 1.0 (Default branch) |
PHP Script to search muliplte files Urgent |
writing a script |
Opcache settings (initial) |