Products.CacheSetup Installation
================================

``Products.CacheSetup`` is the python egg version of the old
``CacheSetup`` product.  The egg version automatically takes
care of installing all the dependancies that make up the
CacheFu bundle.  However, the proxy cache configs must
still be downloaded and configured separately.

References to the "Manual" below refer to the new CacheFu
manual nearing completion as of this release.  Visit the 
official CacheFu site, http://plone.org/products/cachefu, 
for the latest instructions.

There are three options for installation, and then some
post-installation steps:


(1) Global Install
------------------

To install ``Products.CacheSetup`` into the global Python
environment (or a workingenv) using a traditional Zope 2
instance:

* Run ``easy_install Products.CacheSetup``. 
  Find out how to install setuptools (and EasyInstall) here:
  http://peak.telecommunity.com/DevCenter/EasyInstall

* If you are using Zope 2.9 (not 2.10), get `pythonproducts`_
  and install it into your Zope instance via::

      python setup.py install --home /path/to/instance

.. _pythonproducts: http://plone.org/products/pythonproducts


(2) Local Install (standard buildout install)
---------------------------------------------

To install ``Products.CacheSetup`` into the local zope instance
if you are using ``zc.buildout`` and the ``plone.recipe.zope2instance``
recipe to manage your project:

* Add ``Products.CacheSetup`` to the list of eggs to
  install::
 
      [buildout]
      ...
      eggs =
          ...
          Products.CacheSetup

* Re-run buildout::

      $ ./bin/buildout


(3) Local Install (old style Product install)
---------------------------------------------

Because its top level python namespace package is called
``Products``, this package can also be installed in Zope 2
as an old style *Zope 2 Product*.

For an old style Product install, move (or symlink) the
``CacheSetup`` folder of this project
(``Products.CacheSetup/Products/CacheSetup``) into the
``Products`` directory of the Zope instance, and restart
the server.

Note that in this case, dependancies are not automatically
installed so you will have to repeat this process for
the rest of the CacheFu bundle: ``Products.CMFSquidTool``,
``Products.PageCacheManager``, and ``Products.PolicyHTTPCacheManager``.


Post-Installation Steps
-----------------------

If installing for the first time:

* After starting up Zope, install the CacheSetup product 
  via the Plone "Add/Remove Products" page

* Optional: Configure via the "Cache Configuration Tool"
  (see "Configuring CacheFu" in the Manual)

* Optional: Install and configure Squid or Varnish
  (see below)


If upgrading from a pre-1.2 version:

* Remove the previous version from the Products 
  directory of the instance.  ``CacheSetup``, ``CMFSquidTool``,
  ``PageCacheManager``, and ``PolicyHTTPCacheManager`` have all
  been replaced by ``Products.CacheSetup``, ``Products.CMFSquidTool``,
  etc.  If CacheFu was previously installed in a buildout
  via ``plone.recipe.distros``, then remove the old CacheFu
  settings from this section and re-run buildout.

* Restart Zope

* Click on the reinstall link next to the CacheSetup
  product in the Plone "Add/Remove Products" page

* Note: A reinstall keeps your old pre-1.1 configuration
  in a Cache Policy named "Old Cache Policy".  Any other
  cache policies with ids that conflict with the new ones
  will be backed up and relabeled appropriately

* Optional: Configure via the "Cache Configuration Tool"
  (see "Configuring CacheFu" in the Manual)

* Optional: Install and configure Squid or Varnish
  (see below)

* IMPORTANT: There is no upgrade path from the pre-1.0
  versions of CacheFu.  In this case, the old CacheFu
  products should be completely uninstalled via the Plone
  "Add/Remove Products" page and then deleted from the
  Products directory of the instance BEFORE installing
  the new version.


Proxy Cache Installation and Configuration
------------------------------------------

Buildout recipes for building and configuring Squid, Varnish,
and Apache are available:

* http://pypi.python.org/pypi/plone.recipe.squid

* http://pypi.python.org/pypi/plone.recipe.varnish

* http://pypi.python.org/pypi/plone.recipe.apache

Previously, the CacheFu bundle also included a collection of
auto-generated proxy configs for Squid, Varnish, and Apache.
Starting with version 1.2, this collection is now maintained
as a separate download found at http://plone.org/products/cachefu


