Static Page Caching 2.x

Legacy documentation for Static Page Caching 2.x.

Static Page Caching has some hidden configuration variables available for use. These are placed in system/expressionengine/config/config.php and are used to over-ride default behavior. These are advanced configuration options that should only be used by experienced ExpressionEngine users. Each SPC configuration variable listed below should be prefixed with spc. as shown:

spc.preferred_fetch_method

$config['spc.preferred_fetch_method'] = 'auto';

This is the preferred way the page will be fetched from the server to retrieve the data for caching. Unless there is a problem fetching the data, you should leave it on auto-detect. Options are:

  • auto - Auto-Detect
  • curl - cURL
  • fsockopen - fsockopen
  • file_get_contents - file_get_contents

spc.htaccess_path

$config['spc.htaccess_path'] = '/home/mysite/public_html/.htaccess';

The server path to the .htaccess file for this Site. Make sure this file exists and is writable (666).

spc.cache_folder_url

$config['spc.cache_folder_url'] = 'http://mysite.com/caching_folder/';

URL path to the directory where SPC will store the static cached files for cached pages. By default, SPC looks for a folder called static_page_caching.

spc.cache_folder_path

$config['spc.cache_folder_path'] = '/home/mysite/public_html/caching_folder/';

Server path to the directory where SPC will store the static cached files for cached pages. By default, SPC looks for a folder called static_page_caching.

spc.smart_template_editing_enabled

$config['spc.smart_template_editing_enabled'] = 'y';

Controls whether or not SPC renews the cache on URI's that could be affected by editing of a template. Enter a value of y or n.

spc.smart_entry_editing_enabled

$config['spc.smart_entry_editing_enabled'] = 'y';

Controls whether or not SPC renews the cache on URI's that could be affected by editing of an entry. Enter a value of y or n.

spc.cache_renewal_interval

$config['spc.cache_renewal_interval'] = '24';

Controls how often you want SPC to renew cached URI's. Specify a numeric value in hours:

  • 0 - never
  • 0.5 - every 30 minutes
  • 1 - every hour
  • 2 - every 2 hours
  • 6 - every 6 hours
  • 12 - every 12 hours
  • 24 - every 24 hours
  • 48 - every 2 days
  • 120 - every 5 days
  • 158 - every 7 days