Skip to content

Instantly share code, notes, and snippets.

View bdalziel's full-sized avatar

Ben Dalziel bdalziel

View GitHub Profile
$tag = "a tag to contain a list of cacheId";
$cacheId = "some key to cache";
if ( ! $keys = $this->_cache->load( $tag ) ) {
$keys = array( $cacheId );
$this->_cache->save( $keys, $tag );
}
else if ( ! in_array( $cacheId, $keys ) ) {
$keys[] = $cacheId;
$this->_cache->save( $keys, $tag );