public function onInitCache($event)
    {
        $sender = $event->sender;
        $data = $event->data;
        if (isset($data['prefix'])) {
            $sender->cachePrefix = $data['prefix'];
        } else {
            $sender->cachePrefix = $sender::className();
        }
    }
public function onInitCache($event)
    {
        $sender = $event->sender;
        $data = $event->data;
        if (isset($data['prefix'])) {
            $sender->cachePrefix = $data['prefix'];
        } else {
            $sender->cachePrefix = $sender::className();
        }
    }
public function onInitCache ( $ event ) { $ sender = $ event -> sender ; $ data = $ event -> data ; if ( isset ( $ data [ 'prefix' ] ) ) { $ sender -> cachePrefix = $ data [ 'prefix' ] ; } else { $ sender -> cachePrefix = $ sender :: className ( ) ; } }
Initialize the cache prefix.
@param ModelEvent $event
Initialize the cache prefix .