samples/PhotoAlbum/lib/rb.php
public function store( $bean ) {
		$id = parent::store($bean);
		$type = $bean->getMeta('type');
		if (!isset($this->cache[$type])) $this->cache[$type]=array();
		$this->cache[$type][$id] = $bean;
		return $id;
	}
public function store( $bean ) {
		$id = parent::store($bean);
		$type = $bean->getMeta('type');
		if (!isset($this->cache[$type])) $this->cache[$type]=array();
		$this->cache[$type][$id] = $bean;
		return $id;
	}
public function store ( $ bean ) { $ id = parent :: store ( $ bean ) ; $ type = $ bean -> getMeta ( 'type' ) ; if ( ! isset ( $ this -> cache [ $ type ] ) ) $ this -> cache [ $ type ] = array ( ) ; $ this -> cache [ $ type ] [ $ id ] = $ bean ; return $ id ; }
Stores a RedBean OODBBean and caches it.

@param RedBean_OODBBean $bean the bean you want to store

@return integer $id
Stores a RedBean OODBBean and caches it .