@@ -21,15 +21,42 @@ How Does Caching Work?
2121
2222Caching can be enabled on a per-page basis, and you can set the length
2323of time that a page should remain cached before being refreshed. When a
24- page is loaded for the first time, the file will be cached using the
25- currently configured cache engine. On subsequent page loads, the cache file
24+ page is loaded for the first time, the page will be cached using the
25+ currently configured cache engine. On subsequent page loads, the cache
2626will be retrieved and sent to the requesting user's browser. If it has
2727expired, it will be deleted and refreshed before being sent to the
2828browser.
2929
3030.. note :: The Benchmark tag is not cached so you can still view your page
3131 load speed when caching is enabled.
3232
33+ Configuring Caching
34+ ===================
35+
36+ Setting Cache Engine
37+ --------------------
38+
39+ Before using Web Page Caching, you must set the cache engine up by editing
40+ **app/Config/Cache.php **. See :ref: `libraries-caching-configuring-the-cache `
41+ for details.
42+
43+ Setting $cacheQueryString
44+ -------------------------
45+
46+ You can set whether or not to include the query string when generating the cache
47+ with ``Config\Cache::$cacheQueryString ``.
48+
49+ Valid options are:
50+
51+ - ``false ``: (default) Disabled. The query string is not taken into account; the
52+ same cache is returned for requests with the same URI path but different query
53+ strings.
54+ - ``true ``: Enabled, take all query parameters into account. Be aware that this
55+ may result in numerous cache generated for the same page over and over
56+ again.
57+ - **array **: Enabled, but only take into account the specified list of query
58+ parameters. E.g., ``['q', 'page'] ``.
59+
3360Enabling Caching
3461================
3562
@@ -46,15 +73,12 @@ the order that it appears, so place it wherever it seems most logical to
4673you. Once the tag is in place, your pages will begin being cached.
4774
4875.. important :: If you change configuration options that might affect
49- your output, you have to manually delete your cache files.
50-
51- .. note :: Before the cache files can be written you must set the cache
52- engine up by editing **app/Config/Cache.php **.
76+ your output, you have to manually delete your cache.
5377
5478Deleting Caches
5579===============
5680
57- If you no longer wish to cache a file you can remove the caching tag and
81+ If you no longer wish to cache a page you can remove the caching tag and
5882it will no longer be refreshed when it expires.
5983
6084.. note :: Removing the tag will not delete the cache immediately. It will
0 commit comments