public function cacheInvalidate( $type = self::ALL )
    {
        switch( $type ) {
            case self::PERSISTED:
                $return = count( $this->instancesPersisted );
                $this->instancesPersisted = array();
                return $return;
            case self::UNPERSISTED:
                $return = count( $this->instancesUnpersisted );
                $this->instancesUnpersisted = array();
                return $return;
            case self::ALL:
                $return = count( $this->instancesPersisted ) + count( $this->instancesUnpersisted );
                $this->instancesPersisted = array();
                $this->instancesUnpersisted = array();
                return $return;
        }
        throw new \InvalidArgumentException("Bad source `{$source}` passed to " . __FUNCTION__);
    }
public function cacheInvalidate( $type = self::ALL )
    {
        switch( $type ) {
            case self::PERSISTED:
                $return = count( $this->instancesPersisted );
                $this->instancesPersisted = array();
                return $return;
            case self::UNPERSISTED:
                $return = count( $this->instancesUnpersisted );
                $this->instancesUnpersisted = array();
                return $return;
            case self::ALL:
                $return = count( $this->instancesPersisted ) + count( $this->instancesUnpersisted );
                $this->instancesPersisted = array();
                $this->instancesUnpersisted = array();
                return $return;
        }
        throw new \InvalidArgumentException("Bad source `{$source}` passed to " . __FUNCTION__);
    }
public function cacheInvalidate ( $ type = self :: ALL ) { switch ( $ type ) { case self :: PERSISTED : $ return = count ( $ this -> instancesPersisted ) ; $ this -> instancesPersisted = array ( ) ; return $ return ; case self :: UNPERSISTED : $ return = count ( $ this -> instancesUnpersisted ) ; $ this -> instancesUnpersisted = array ( ) ; return $ return ; case self :: ALL : $ return = count ( $ this -> instancesPersisted ) + count ( $ this -> instancesUnpersisted ) ; $ this -> instancesPersisted = array ( ) ; $ this -> instancesUnpersisted = array ( ) ; return $ return ; } throw new \ InvalidArgumentException ( "Bad source `{$source}` passed to " . __FUNCTION__ ) ; }
Invalidate cache. Returns multiton to it's vanilla state. Required for unit testing.
Invalidate cache . Returns multiton to it s vanilla state . Required for unit testing .