Clearing the Cache By Tag(s)

The caching on a client web site is controlled by the Module_Pages_ClientRenderer_Cache class. You can use this class to clear any cache items that have a particular tag associated with them.

This is achieved using the ClearByTag() method. This method accepts any number of arguments, each of which is either a tag or an array of tags.

Example 8.4. Clearing the client web site cache by tags

<?php
    Module_Pages_ClientRenderer_Cache::ClearByTag('my custom tag');

    Module_Pages_ClientRenderer_Cache::ClearByTag('my custom tag', 'another tag');

    Module_Pages_ClientRenderer_Cache::ClearByTag(array('my custom tag', 'another tag'));
?>