SallyCMS addOn, enabling the use of annotations to cache slice outputs

dev-default / 1.x-dev 2014-02-18 02:11 UTC

This package is auto-updated.

Last update: 2020-08-08 14:07:13 UTC


This is a tiny, proof of concept addOn for SallyCMS. It adds caching to the slice renderer, allowing to cache the slice output for (at least for now) a fixed amount of time.


  • SallyCMS 0.8+
  • PHP 5.3.3+


Add the following requirements to your composer.json:

    "require": {
        "webvariants/slice-cache": "$VERSION"

Replace $VERSION with one of the available versions on Packagist.


There is just one single thing you have to do: Place an annotation with the name wv-ttl in your module (preferably in both the input and output module), containing the number of seconds the slice output can be cached for.

 * @sly name     mymodule
 * @sly title    My super awesome module
 * @sly wv-ttl   600

The example above would lead to the output being cached for 10 minutes.

Since the actual slice values are encoded and part of the cache key, changes in the backend lead to another cache key and appear therefore immediately.

Note: This addOn is not yet fully finished. It does not clean up its cache when an article or slice is removed and surely has some other oversights.


SliceCache is licensed under the MIT License - see the LICENSE file for details.