/**
  * Empty/reset the cache
  */
 function clear()
 {
     $this->subset_cache = array();
     $this->loaded_subsets = array();
     $this->root_cats = array();
     $this->subset_root_cats = array();
     $this->revealed_all_children = false;
     $this->revealed_subsets = array();
     $this->sorted_flags = array();
     $this->urlname_index = array();
     parent::clear();
 }
 /**
  * Clear our caches.
  */
 function clear($keep_shadow = false)
 {
     $this->alreadyCached = array();
     $this->cache_login = array();
     return parent::clear($keep_shadow);
 }
 /**
  * Clear the cache **extensively**
  *
  * @param boolean Keep copy of cache in case we try to re instantiate previous object
  * @param string What to clear: 'all', 'user', 'item', 'comment', 'file'
  * @param integer ID of the clearing object
  */
 function clear($keep_shadow = false, $object = 'all', $object_ID = 0)
 {
     parent::clear($keep_shadow);
     switch ($object) {
         case 'all':
             // Clear all cached objects
             $this->cache_item = array();
             $this->loaded_cache_item = array();
             $this->cache_comment = array();
             $this->loaded_cache_comment = array();
             $this->cache_user = array();
             $this->loaded_cache_user = array();
             $this->cache_file = array();
             $this->loaded_cache_file = array();
             break;
         case 'item':
         case 'comment':
         case 'user':
         case 'file':
             // Clear only the selected type of objects
             if (empty($object_ID)) {
                 // Clear all cached objects of this type
                 $this->{'cache_' . $object} = array();
                 $this->{'loaded_cache_' . $object} = array();
             } else {
                 // Clear a cache only one object
                 unset($this->{'cache_' . $object}[$object_ID]);
                 unset($this->{'loaded_cache_' . $object}[$object_ID]);
             }
             break;
     }
 }