This article was written during Vivio Swift's beta release.
The Vivio Swift Cache page gives you access to the details of the Vivio Swift caching features and their corresponding configuration options. The caching processes in Vivio Swift are designed to be extremely aggressive in it's caching process, and will try to cache all pages and URL's that PHP has access to. This gives you the ability to be very selective in what Vivio Swift does NOT cache, by configuring the various exclusions in Vivio Swift's appropriately titled Exclusion section.
On-Access Cache creates a cached version of a page on your site when that page is first hit. The initial page hit is delivered dynamically by PHP, but that dynamically rendered page is stored as a cached page and delivered to all subsequent hits to that particular URL. The On-Access Cache process is subject to all the same rules and exclusions as the Preload Cache, differs in that there is no pre-determined expiration time for the cached page, and pages that do not get requests are not cached.
The On-Access Cache page lets you enable or disable On-Access Cache, and gives you the option to clear your current cache. Clearing your cache will trigger a Refresh Event if you have Preload Cache enabled.
Preload Cache will "spider" your entire site and create a cached version of every page on your site. This process works in the background in order to have minimal affect on your site's performance. Again, the Vivio Swift caching process is designed to be very aggressive, so that as much as possible will be cached, with you telling Vivio Swift which pages you do not want cached using the Exclusion section. The Preload Cache process differs from the On-Access Cache process in that cached pages have a specific expiration time, which is configured in this page (default is 1-hour), and will automatically refresh cache after the time has elapsed. If you wish to do a cache refresh manually, you can also do that from this page.
Note that clearing your cache will trigger a refresh event if you have Preload Cache enabled.
Refresh Events are events that occur within WordPress that will clear out your current cache, and build a new cache using the Preload Cache background process within Vivio Swift in order to have minimal affect on your site's performance.
The Browser Cache options require Apache's mod_headers module to be installed. Check Vivio Swift's "System Info" page to ensure this module is enabled on your system.
The Browser Cache section in Vivio Swift gives you greater control over how your content is cached within a visitor's web browser. Caching in a visitors web browser is ideal as it offers the fastest response time for your visitors, and saves your server and your other caching mechanisms (like CDN's) from unnecessary bandwidth and resource usage. The Vivio Swift plugin specifically modifies the "Cache Control Max-Age" value for your content.
Of all the configuation pages within Vivio Swift, the Browser Cache page is probably the most complicated due to it's unique use of "groups". Vivio Swift edits Cache Control rules based on the file extensions of the files being sent to the user. For example, if the server is sending an HTML file to the user, the Cache Control value of that file is determined by the group that the "html" file extension is located in. By default, html files are placed in the "Static Files" group. No group is required and you are free to delete and/or reconfigure the default groups however you see fit. The default groups are there primarily as a typical file organization example to get you started.
Per the Cache Control specification, the max-age value for any file type is stated in seconds. To help you along, the following is a table of seconds and their corresponding time frames:
|86400||24 hours (1 day)|
|604800||7 days (1 week)|
Note that setting "Enable Browser Cache" to disabled will disable Vivio Swift from modifying the max-age value for all groups - even if specific groups are still enabled. If the "Enable Browser Cache" switch is enabled, each group can then be enabled and disabled individually.
The Extras page in Vivio Swift Cache section currently provides one option - the ability to remove query strings from static assets.
Query strings on static assets are useful during development, as it causes some static assets to NOT get cached when you're changing them. However, for production environments, we recommend removing query strings from static assets in order to better facilitate caching both within Vivio Swift and other caching layers (like CDN's).
The following images are examples of specifically what this option does to your static asset URL's:
|Without "Remove Query Strings"||With "Remove Query Strings"|
Notice the "?ver=" at the end of the .js URL's in those examples.