Development Wiki

Umil.cache purge

From phpBB Development Wiki

Revision as of 00:11, 5 July 2009 by Sajaki (Talk | contribs)

umil::cache_purge –– Purges a cache using the Umil Library.


string umil::cache_purge ( mixed $type [, int $style_id ] )


Parameter Required/Default Usage
type default '' The type of Purge you wish to perform ('', 'auth', 'imageset', 'template', 'theme'). Blank purges the forum cache ($cache->purge()).
style_id default 0 Leave as 0 when submitting either 'imageset', 'template', or 'theme' to clear them all, or submit a specific id to clear only that one.

Return Values

Returns result or umil_end data

This article is a stub. You can help in improving Olympus Documentation by expanding it.


Example #1

Purge the forum's cache folder (same as running $cache->purge())


Example #2

Purging the Auth cache ($cache->destroy('_acl_options'); & $auth->acl_clear_prefetch();)


Example #3

Purging an Imageset Cache ('template' and 'theme' work the same)


Example #4

Purging the imageset cache for style 1 ('template' and 'theme' work the same)


Example #5

Purging multiple caches with 1 call (in this case, the cache folder, the auth, imageset 1, template 2, and all the themes)

''// The cache folder
'auth'// The auth
array('imageset'1), // The imageset (1)
array('template'2), // The template (2)
'theme'// The theme (all)

See Also