Installation

Installation Instructions

  • Unzip the newly downloaded .zip file.
  • Upload the /system/expressionengine/third_party/ce_cache folder to the /system/expressionengine/third_party/ directory of your site.
  • Upload the /themes/third_party/ce_cache folder to the /themes/third_party/ directory of your site.
  • Enable the module and extension. Log into your control panel and go to Add-Ons -> Modules. Locate CE Cache in the list and click on the Install link. Choose to install both the module and the extension.
  • Set permissions. Make sure your system/expressionengine/cache directory has full 777 permissions (it already should per the EE installation instructions).
  • Ensure your site has a unique name. This can be done in the control panel by going to Admin -> General Configuration and making sure that the "Name of your site" field is populated. This is important if you will be using the Memcache, Memcached, Redis, or APC drivers in a shared hosting environment, as those drivers could have multiple sites using them. The site name will be used to create a unique prefix for each site to avoid the possibility of accidental cache collisions.
  • Optionally create a secret key config item that will be used to validate requests. Simply add $config['ce_cache_secret'] = 'your_key_here'; to your config.php file, and replace your_key_here with several random characters. Take a look at the configuration page for more details.

Upgrade Instructions

  • Check the change log to see if there are any new settings or changes you need to take into consideration before upgrading.
  • Clear your cache for all drivers. To do so, log in to your control panel and navigate to Add-Ons -> Modules -> CE Cache and click on "Clear Entire Cache For All Drivers".
  • Unzip the newly downloaded .zip file.
  • Replace your /system/expressionengine/third_party/ce_cache directory with the newly downloaded /system/expressionengine/third_party/ce_cache folder.
  • Replace your /themes/third_party/ce_cache directory with the newly downloaded /themes/third_party/ce_cache folder.
  • Visit the module page. Log into your control panel and go to Add-Ons -> Modules -> CE Cache so that the module can update itself.
  • Visit the extension page, to ensure that it is updated as well, by navigating to Add-Ons->Extensions.

Static Driver (Optional)

If you are planning to use CE Cache with the included static driver, follow the steps in the Static Driver Installation page in the module. The static caching page also has useful installation instructions, including how to set up CE Cache static caching with nginx.

Note: Log into the control panel and navigate to Add-Ons -> Modules -> CE Cache -> Static Driver Installation for site-specific installation instructions

APC (Optional)

If you are planning to use CE Cache with APC, it must be installed on your server and configured.

Note: Support will not cover installing, configuring, or troubleshooting APC. This add-on simply allows it to be integrated with ExpressionEngine®. CE Cache should work with APC if you have it installed and configured correctly.

Please do not try installing APC if you do not know what you’re doing! You could cause irreparable damage to your server if you make a mistake when using the command line. Please contact your server host or system administrator to perform the installation on your behalf. I will not be held responsible for any harm you bring to your server if you mess something up. Continue at your own risk!

If you have different APC installation instructions (perhaps for a different OS) that you have working with CE Cache and you would like to share, please let me know!

Install APC on Ubuntu 11.10

The following code snippet contains terminal commands that I used to install APC on a server running Ubuntu 11.10. I make no claims that the following will work for you. Proceed at your own risk!

To prepare, install the following:

apt-get install build-essential
apt-get install libpcre3-dev
apt-get install php5-dev

Install APC:

pecl install apc

Add the APC PHP Extension to the config and restart Apache:

echo "extension=apc.so" > /etc/php5/apache2/conf.d/apc.ini
/etc/init.d/apache2 restart

Install APC on CentOS 5

The following code snippet contains terminal commands that I used to install APC on a server running CentOS 5. I make no claims that the following will work for you. Proceed at your own risk!

Install these dependencies:

yum install php-pear
yum install php-devel
yum install httpd-devel

Install APC:

pecl install apc

Add the APC PHP Extension to the config and restart Apache:

echo "extension=apc.so" > /etc/php.d/apc.ini
apachectl restart

Optional APC Configuration settings

Here is a small snippet of optional settings you can place in your apc.ini config file that may be beneficial when setting up APC. This will enable APC to work its magic caching other PHP code on your server, in addition to the user caching that will be interfacing with CE Cache. These settings are provided as a courtesy, but may not be applicable to your server configuration. Use the following settings at your own risk; you assume all liability if the code (or something you do) botches your server setup. Again, APC setup and configuration is not supported, and I am not liable if you botch your server, whether that be because you make a mistake, or because I did. Proceed at your own risk!

Note: You can optionally add these settings to your config. Do not replace your config file with the following settings; they are meant to be added to your existing settings. Also, always backup your configuration files before altering them.

;enable caching by default
apc.cache_by_default = 1
;a negative filter to prevent the bootstrap file from being cached (or else no dynamic pages)
apc.filters = "-/index\.php"

Memcache/Memcached (Optional)

If you are planning to use CE Cache with Memcached or Memcache, it must be installed on your server and configured.

Memcache(d) work with CE Cache, but innately have no way of looping through cached items. This means that cache breaking functionality, and viewing cached items in the control panel will not be possible.

Note: Support will not cover installing, configuring, or troubleshooting Memcache or Memcached. This add-on simply allows them to be integrated with ExpressionEngine®. CE Cache should work with Memcache or Memcached if you have them installed and configured correctly.

Please do not try installing Memcache or Memcached if you do not know what you’re doing! You could cause irreparable damage to your server if you make a mistake when using the command line. Please contact your server host or system administrator to perform the installation on your behalf. I will not be held responsible for any harm you bring to your server if you mess something up. Continue at your own risk!

If you have different Memcache or Memcached installation instructions (perhaps for a different OS) that you have working with CE Cache and you would like to share, please let me know!

Install Memcache on Ubuntu 11.10

The following code snippet contains terminal commands that I used to install Memcache on a server running Ubuntu 11.10. This code is provided as a courtesy, but may not be applicable to you. Use at your own risk!

apt-get install memcached
memcached -d -m 1024 -u root -1 127.0.0.1 -p 11211
pecl install memcache
echo "extension=memcache.so" > /etc/php5/apache2/conf.d/memcache.ini
/etc/init.d/apache2 restart

The start memcached command can basically be laid out like this:

memcached -d -m [memory size] -u [user] -l [listening IP] -p [port]

Install Memcache on CentOS 5

The following code snippet contains terminal commands that I used to install Memcache on a server running CentOS 5. This code is provided as a courtesy, but may not be applicable to you. Use at your own risk!

yum install zlib-devel
pecl install memcache
echo "extension=memcache.so" > /etc/php.d/memcache.ini
memcached -d -m 256 -u root -l 127.0.0.1 -p 11211
apachectl restart

The start memcached command can basically be laid out like this:

memcached -d -m [memory size] -u [user] -l [listening IP] -p [port]

Redis (Optional)

If you are planning to use CE Cache with Redis, it must be installed on your server and configured.

Note: Support will not cover installing, configuring, or troubleshooting Redis. This add-on simply allows it to be integrated with ExpressionEngine®. CE Cache should work with Redis if you have it installed and configured correctly.

Please do not try installing Redis if you do not know what you’re doing! You could cause irreparable damage to your server if you make a mistake when using the command line. Please contact your server host or system administrator to perform the installation on your behalf. I will not be held responsible for any harm you bring to your server if you mess something up. Continue at your own risk!

Note: Before CE Cache version 1.11.0, you’ll need to install both the Redis server and a PHP Redis extension. Starting in Cache version 1.11.0, CE Cache includes Predis which removes the need for the PHP Redis extension.

Redis Server General Considerations

The following quote is from Pv Ledoux. This is great to keep in mind after getting Redis installed:

Unless you use Redis as [a] DB tool, it would be a good idea to limit its memory consumption in the config file (/etc/redis/redis.conf), with the maxmemory option. You should set the maxmemory-policy to volatile-ttl, each will expire keys with the nearest expire time if maxmemory is reached.

Install Redis

Check out the Redis installation documentation.

SQLite (Optional)

If you are planning to use CE Cache with SQLite, it must be installed on your server and configured.

Note: Support will not cover installing, configuring, or troubleshooting SQLite. This add-on simply allows it to be integrated with ExpressionEngine®. CE Cache should work with SQLite if you have it installed and configured correctly.

Please do not try installing SQLite if you do not know what you’re doing! Please contact your server host or system administrator to perform the installation on your behalf. I will not be held responsible for any harm you bring to your server if you mess something up. Continue at your own risk!

Install SQLite

The SQLite3 extension is enabled by default as of PHP version 5.3.