Plugin Directory

Changeset 2676363


Ignore:
Timestamp:
02/10/2022 01:09:13 PM (4 years ago)
Author:
Lugat
Message:

readme

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jinx-fast-cache/trunk/readme.txt

    r2676361 r2676363  
    2828After activating the plugin, it will modify your htaccess file. If this is not possible, make sure the enter the rules by yourself:
    2929
    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
    3836
    3937When using nginx, make sure to add the following rules:
    4038
    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    }
    5047
    5148You may flush, warm or refresh (flush & warm) single or multiple URLs using the buttons in the admin bar.
     
    8077
    8178Inject 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
    8582
    8683This 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
    9087
    9188You 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
    9895
    9996== Roadmap ==
Note: See TracChangeset for help on using the changeset viewer.