Skip to content

Commit

Permalink
Improve docs and implementation; see wpsharks/comet-cache#169
Browse files Browse the repository at this point in the history
  • Loading branch information
JasWSInc committed Jun 18, 2014
1 parent 79f73eb commit 83e55d6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 17 deletions.
6 changes: 3 additions & 3 deletions codex/source-class-quick_cache.menu_pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ <h3>Functions</h3>
</span><span id="327" class="l"><a class="l" href="#327">327: </a>
</span><span id="328" class="l"><a class="l" href="#328">328: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;div class=&quot;plugin-menu-page-panel-body clearfix&quot;&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="329" class="l"><a class="l" href="#329">329: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;h3&gt;'</span>.__(<span class="php-quote">'Don\'t Cache These Special URI Exclusion Patterns?'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/h3&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="330" class="l"><a class="l" href="#330">330: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p&gt;'</span>.__(<span class="php-quote">'Sometimes there are certain cases where a particular file, or a particular group of files, should never be cached. This is where you will enter those if you need to (one per line). Searches are performed against the &lt;a href=&quot;http://www.php.net/manual/en/reserved.variables.server.php&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;code&gt;REQUEST_URI&lt;/code&gt;&lt;/a&gt;; i.e. &lt;code&gt;/path/?query&lt;/code&gt; (case sensitive). So, don\'t put in full URLs here, just word fragments found in the file path (or query string) is all you need, excluding the http:// and domain name. A wildcard &lt;code&gt;*&lt;/code&gt; character can also be used when necessary; e.g. &lt;code&gt;/category/abc-followed-by-*&lt;/code&gt;; (where &lt;code&gt;*&lt;/code&gt; = anything, 0 or more characters in length).'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="330" class="l"><a class="l" href="#330">330: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p&gt;'</span>.__(<span class="php-quote">'Sometimes there are certain cases where a particular file, or a particular group of files, should never be cached. This is where you will enter those if you need to (one per line). Searches are performed against the &lt;a href=&quot;https://gist.github.com/jaswsinc/338b6eb03a36c048c26f&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;code&gt;REQUEST_URI&lt;/code&gt;&lt;/a&gt;; i.e. &lt;code&gt;/path/?query&lt;/code&gt; (case sensitive). So, don\'t put in full URLs here, just word fragments found in the file path (or query string) is all you need, excluding the http:// and domain name. A wildcard &lt;code&gt;*&lt;/code&gt; character can also be used when necessary; e.g. &lt;code&gt;/category/abc-followed-by-*&lt;/code&gt;; (where &lt;code&gt;*&lt;/code&gt; = anything, 0 or more characters in length).'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="331" class="l"><a class="l" href="#331">331: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p&gt;&lt;textarea name=&quot;'</span>.esc_attr(__NAMESPACE__).<span class="php-quote">'[save_options][exclude_uris]&quot; rows=&quot;5&quot; spellcheck=&quot;false&quot; class=&quot;monospace&quot;&gt;'</span>.format_to_edit(plugin()-&gt;options[<span class="php-quote">'exclude_uris'</span>]).<span class="php-quote">'&lt;/textarea&gt;&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="332" class="l"><a class="l" href="#332">332: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p class=&quot;info&quot;&gt;'</span>.__(<span class="php-quote">'&lt;strong&gt;Tip:&lt;/strong&gt; let\'s use this example URL: &lt;code&gt;http://www.example.com/post/example-post-123&lt;/code&gt;. To exclude this URL, you would put this line into the field above: &lt;code&gt;/post/example-post-123&lt;/code&gt;. Or, you could also just put in a small fragment, like: &lt;code&gt;example&lt;/code&gt; or &lt;code&gt;example-*-123&lt;/code&gt; and that would exclude any URI containing that word fragment.'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="333" class="l"><a class="l" href="#333">333: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p class=&quot;info&quot;&gt;'</span>.__(<span class="php-quote">'&lt;strong&gt;Note:&lt;/strong&gt; please remember that your entries here should be formatted as a line-delimited list; e.g. one exclusion pattern per line.'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
Expand All @@ -446,7 +446,7 @@ <h3>Functions</h3>
</span><span id="343" class="l"><a class="l" href="#343">343: </a>
</span><span id="344" class="l"><a class="l" href="#344">344: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;div class=&quot;plugin-menu-page-panel-body clearfix&quot;&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="345" class="l"><a class="l" href="#345">345: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;h3&gt;'</span>.__(<span class="php-quote">'Don\'t Cache These Special HTTP Referrer Exclusion Patterns?'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/h3&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="346" class="l"><a class="l" href="#346">346: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p&gt;'</span>.__(<span class="php-quote">'Sometimes there are special cases where a particular referring URL (or referring domain) that sends you traffic; or even a particular group of referring URLs or domains that send you traffic; should result in a page being loaded on your site that is NOT from the cache (and that resulting page should never be cached). This is where you will enter those if you need to (one per line). Searches are performed against the &lt;a href=&quot;http://www.php.net/manual/en/reserved.variables.server.php&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;code&gt;HTTP_REFERER&lt;/code&gt;&lt;/a&gt; (case sensitive). A wildcard &lt;code&gt;*&lt;/code&gt; character can also be used when necessary; e.g. &lt;code&gt;*.domain.com&lt;/code&gt;; (where &lt;code&gt;*&lt;/code&gt; = anything, 0 or more characters in length).'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="346" class="l"><a class="l" href="#346">346: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p&gt;'</span>.__(<span class="php-quote">'Sometimes there are special cases where a particular referring URL (or referring domain) that sends you traffic; or even a particular group of referring URLs or domains that send you traffic; should result in a page being loaded on your site that is NOT from the cache (and that resulting page should never be cached). This is where you will enter those if you need to (one per line). Searches are performed against the &lt;a href=&quot;https://gist.github.com/jaswsinc/338b6eb03a36c048c26f&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;code&gt;HTTP_REFERER&lt;/code&gt;&lt;/a&gt; (case sensitive). A wildcard &lt;code&gt;*&lt;/code&gt; character can also be used when necessary; e.g. &lt;code&gt;*.domain.com&lt;/code&gt;; (where &lt;code&gt;*&lt;/code&gt; = anything, 0 or more characters in length).'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="347" class="l"><a class="l" href="#347">347: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p&gt;&lt;textarea name=&quot;'</span>.esc_attr(__NAMESPACE__).<span class="php-quote">'[save_options][exclude_refs]&quot; rows=&quot;5&quot; spellcheck=&quot;false&quot; class=&quot;monospace&quot;&gt;'</span>.format_to_edit(plugin()-&gt;options[<span class="php-quote">'exclude_refs'</span>]).<span class="php-quote">'&lt;/textarea&gt;&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="348" class="l"><a class="l" href="#348">348: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p class=&quot;info&quot;&gt;'</span>.__(<span class="php-quote">'&lt;strong&gt;Tip:&lt;/strong&gt; let\'s use this example URL: &lt;code&gt;http://www.referring-domain.com/search/?q=search+terms&lt;/code&gt;. To exclude this referring URL, you could put this line into the field above: &lt;code&gt;www.referring-domain.com&lt;/code&gt;. Or, you could also just put in a small fragment, like: &lt;code&gt;/search/&lt;/code&gt; or &lt;code&gt;q=*&lt;/code&gt;; and that would exclude any referrer containing that word fragment.'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="349" class="l"><a class="l" href="#349">349: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p class=&quot;info&quot;&gt;'</span>.__(<span class="php-quote">'&lt;strong&gt;Note:&lt;/strong&gt; please remember that your entries here should be formatted as a line-delimited list; e.g. one exclusion pattern per line.'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
Expand All @@ -462,7 +462,7 @@ <h3>Functions</h3>
</span><span id="359" class="l"><a class="l" href="#359">359: </a>
</span><span id="360" class="l"><a class="l" href="#360">360: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;div class=&quot;plugin-menu-page-panel-body clearfix&quot;&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="361" class="l"><a class="l" href="#361">361: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;h3&gt;'</span>.__(<span class="php-quote">'Don\'t Cache These Special User-Agent Exclusion Patterns?'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/h3&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="362" class="l"><a class="l" href="#362">362: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p&gt;'</span>.__(<span class="php-quote">'Sometimes there are special cases when a particular user-agent (e.g. a specific browser or a specific type of device); should be shown a page on your site that is NOT from the cache (and that resulting page should never be cached). This is where you will enter those if you need to (one per line). Searches are performed against the &lt;a href=&quot;http://www.php.net/manual/en/reserved.variables.server.php&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;code&gt;HTTP_USER_AGENT&lt;/code&gt;&lt;/a&gt; (case insensitive). A wildcard &lt;code&gt;*&lt;/code&gt; character can also be used when necessary; e.g. &lt;code&gt;Android *; Chrome/* Mobile&lt;/code&gt;; (where &lt;code&gt;*&lt;/code&gt; = anything, 0 or more characters in length).'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="362" class="l"><a class="l" href="#362">362: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p&gt;'</span>.__(<span class="php-quote">'Sometimes there are special cases when a particular user-agent (e.g. a specific browser or a specific type of device); should be shown a page on your site that is NOT from the cache (and that resulting page should never be cached). This is where you will enter those if you need to (one per line). Searches are performed against the &lt;a href=&quot;https://gist.github.com/jaswsinc/338b6eb03a36c048c26f&quot; target=&quot;_blank&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;code&gt;HTTP_USER_AGENT&lt;/code&gt;&lt;/a&gt; (case insensitive). A wildcard &lt;code&gt;*&lt;/code&gt; character can also be used when necessary; e.g. &lt;code&gt;Android *; Chrome/* Mobile&lt;/code&gt;; (where &lt;code&gt;*&lt;/code&gt; = anything, 0 or more characters in length).'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="363" class="l"><a class="l" href="#363">363: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p&gt;&lt;textarea name=&quot;'</span>.esc_attr(__NAMESPACE__).<span class="php-quote">'[save_options][exclude_agents]&quot; rows=&quot;5&quot; spellcheck=&quot;false&quot; class=&quot;monospace&quot;&gt;'</span>.format_to_edit(plugin()-&gt;options[<span class="php-quote">'exclude_agents'</span>]).<span class="php-quote">'&lt;/textarea&gt;&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="364" class="l"><a class="l" href="#364">364: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p class=&quot;info&quot;&gt;'</span>.__(<span class="php-quote">'&lt;strong&gt;Tip:&lt;/strong&gt; if you wanted to exclude iPhones put this line into the field above: &lt;code&gt;iPhone;*AppleWebKit&lt;/code&gt;. Or, you could also just put in a small fragment, like: &lt;code&gt;iphone&lt;/code&gt;; and that would exclude any user-agent containing that word fragment. Note, this is just an example. With a default installation of Quick Cache, there is no compelling reason to exclude iOS devices (or any mobile device for that matter).'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
</span><span id="365" class="l"><a class="l" href="#365">365: </a> <span class="php-keyword1">echo</span> <span class="php-quote">' &lt;p class=&quot;info&quot;&gt;'</span>.__(<span class="php-quote">'&lt;strong&gt;Note:&lt;/strong&gt; please remember that your entries here should be formatted as a line-delimited list; e.g. one exclusion pattern per line.'</span>, plugin()-&gt;text_domain).<span class="php-quote">'&lt;/p&gt;'</span>.<span class="php-quote">&quot;\n&quot;</span>;
Expand Down
Loading

0 comments on commit 83e55d6

Please sign in to comment.