This article provides a detailed analysis of the use of PHP Cache functions. For more information, see
Flush (): refresh the output program cache
For ($ I = 0; $ I <5; $ I ++ ){
Echo str_repeat ("\ n", 5000 );
Echo $ I;
Sleep (1 );
Flush ();
}
Ob_start (callback function, limited length, always output cache = 'true'): enabled, prerequisite: output_buffer = on
Ob_clear (): Refresh
Ob_end_clear (): Close and refresh
Ob_flush (): output
Ob_end_flush (): Close and output
Ob_get_contents: return cache
Ob_get_clean (): returns the cache and refreshes
Ob_get_flush (): returns the cache and closes
Ob_get_length (): return the length of the cached content.
Ob_get_level (): return the cache nesting level
Ob_get_status (return all = false): return the cache status
Ob_gzhandler (): compresses the output cache and serves as a callback function: ob_start ('OB _ gzhandler ')
Ob_implicit_flush (output refresh = true): when the parameter is true, the cache is automatically refreshed every time the cache output is cached.
Ob_list_handlers (): lists all functions that are using cache.
Output_add_rewrite_var (variable, value): add the value of the URL rewriter. this function adds a name/value pair to the URL rewriting mechanism. This type of name-value pair will be added to the URL (in the form of a GET parameter) and form (in the form of an input hidden field). when the URL is transparent
You can also add session IDs when session. use_trans_sid is enabled. Absolute URL (http://example.com/) is not overwritten, function behavior is controlled by the url_rewriter.tags php. ini parameter
Output_add_rewrite_var ('Var ', 'value ');
Echo 'rewriteable '; // after rewriting: link
Echo 'link2'; // The absolute address is not overwritten.
Echo ''; // after rewriting:
Output_reset_rewrite_vars (): resets the value of the URL Rewrite. true is returned successfully.
Output_add_rewrite_var ('Var ', 'value ');
Echo 'not overwritten ';
Output_reset_rewrite_vars (); // reset
Echo 'not overwritten '; // reset, address not overwritten