In eZ Publish 5.x and eZ Platform, the concept of "view cache" has changed. The "module result" part of it (which was basically page-level caching if we didn't count the pagelayout) has been offloaded to HTTP caching, most often implemented with Varnish. In addition, Cache blocks no longer exist and have been replaced by ESI (Edge Side Includes) blocks.
The persistence caching element -- that is, caching of your actual content from the database -- of the "view cache" still exists, handled by default on the file system through the Stash bundle. Stash also supports memcache (which, as its name suggests, uses memory, and has a much better performance). We use memcache(d) for all of our production sites.
Installing memcache or memcached is straightforward. The reference documentation is good, and you can often use the default settings. As an example, on Ubuntu 14 this command is likely all you need:
sudo apt-get install php5-memcached memcached
On the eZ Publish side, this is the default configuration, which you usually end up placing in environment-specific configurations in ezpublish/config/ezpublish_<env>.yml such as ezpublish_prod.yml:
stash: caches: default: drivers: # When using multiple webservers, you must use Memcache or Redis - Memcache inMemory: true registerDoctrineAdapter: false Memcache: prefix_key: yoursite_ retry_timeout: 1 servers: - server: 127.0.0.1 port: 11211
You can add multiple servers to have a memcache pool. If you have a cluster setup, you can simply install memcache on each front-end server. See the eZ documentation for more information. If each front-end server has the same configuration files, use internal network IPs in the configuration instead of using 127.0.0.1 (since every server's pointer for 127.0.0.1 is to itself and thus technically different!)
Also, make sure there is no Stash configuration remaining in the default ezpublish/config/ezpublish.yml file. This could trip you up by overriding your environment-specific settings!
Bonus note: If you have front-end sessions in a cluster, you should also use memcache to store sessions. Use a second memcache pool, however, to minimize the risk that sessions get bumped out of memory by non-session data from eZ's persistence caching.
You'll know pretty quickly if persistence caching is not working because you'll make content changes that won't be reflected properly on your website. Here are some tips to get started and make sure the persistence caching is working fine:
We're a group of web experts who solve complex web problems.Learn more about us »
Many years of experience with complex websites allows us to offer total solutions.Learn more about what we can do »
We've solved problems across North America and around the world.Learn more about what we've done »
Follow us on Twitter for the latest Mugo happenings