Changeset 2676363
- Timestamp:
- 02/10/2022 01:09:13 PM (4 years ago)
- File:
-
- 1 edited
-
jinx-fast-cache/trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jinx-fast-cache/trunk/readme.txt
r2676361 r2676363 28 28 After activating the plugin, it will modify your htaccess file. If this is not possible, make sure the enter the rules by yourself: 29 29 30 ``` 31 # BEGIN Jinx Fast-Cache 32 RewriteEngine On 33 RewriteCond %{DOCUMENT_ROOT}/wp-content/jinx-fast-cache/%{HTTP_HOST}/%{REQUEST_URI}/%{QUERY_STRING}/index.html -s 34 RewriteCond %{REQUEST_METHOD} GET 35 RewriteRule .* /wp-content/jinx-fast-cache/%{HTTP_HOST}/%{REQUEST_URI}/%{QUERY_STRING}/index.html [L] 36 # END Jinx Fast-Cache 37 ``` 30 # BEGIN Jinx Fast-Cache 31 RewriteEngine On 32 RewriteCond %{DOCUMENT_ROOT}/wp-content/jinx-fast-cache/%{HTTP_HOST}/%{REQUEST_URI}/%{QUERY_STRING}/index.html -s 33 RewriteCond %{REQUEST_METHOD} GET 34 RewriteRule .* /wp-content/jinx-fast-cache/%{HTTP_HOST}/%{REQUEST_URI}/%{QUERY_STRING}/index.html [L] 35 # END Jinx Fast-Cache 38 36 39 37 When using nginx, make sure to add the following rules: 40 38 41 ``` 42 set $cache_path false; 43 if ($request_method = GET) { 44 set $cache_path /wp-content/jinx-fast-cache/$host/$uri/$args/index.html; 45 } 46 location / { 47 try_files $cache_path $uri $uri/ /index.php?$query_string; 48 } 49 ``` 39 40 set $cache_path false; 41 if ($request_method = GET) { 42 set $cache_path /wp-content/jinx-fast-cache/$host/$uri/$args/index.html; 43 } 44 location / { 45 try_files $cache_path $uri $uri/ /index.php?$query_string; 46 } 50 47 51 48 You may flush, warm or refresh (flush & warm) single or multiple URLs using the buttons in the admin bar. … … 80 77 81 78 Inject a template: 82 ``` 83 do_action('jinx_fast_cache_inject_template', null, 'user');84 ``` 79 80 do_action('jinx_fast_cache_inject_template', null, 'user'); 81 85 82 86 83 This has the same result as: 87 ``` 88 do_action('jinx_fast_cache_inject', null, 'get_template_part', ['user']);89 ``` 84 85 do_action('jinx_fast_cache_inject', null, 'get_template_part', ['user']); 86 90 87 91 88 You may call every public function of PHP, your theme or plugin: 92 ``` 93 do_action('jinx_fast_cache_inject', null, 'date', ['Y']);94 do_action('jinx_fast_cache_inject', null, 'my_function', ['param1', 'param2']);95 do_action('jinx_fast_cache_inject', null, 'namespace\MyClass::myMethod', ['param1', 'param2']);96 do_action('jinx_fast_cache_inject', null, ['namespace\MyClass', 'myMethod'], ['param1', 'param2']);97 ``` 89 90 do_action('jinx_fast_cache_inject', null, 'date', ['Y']); 91 do_action('jinx_fast_cache_inject', null, 'my_function', ['param1', 'param2']); 92 do_action('jinx_fast_cache_inject', null, 'namespace\MyClass::myMethod', ['param1', 'param2']); 93 do_action('jinx_fast_cache_inject', null, ['namespace\MyClass', 'myMethod'], ['param1', 'param2']); 94 98 95 99 96 == Roadmap ==
Note: See TracChangeset
for help on using the changeset viewer.