protected function prepareData( $data )
    {
        if ( is_resource( $data ) )
        {
            throw new ezcCacheInvalidDataException( gettype( $data ), array( 'simple', 'array', 'object' ) );
        }
        return new ezcCacheStorageMemoryDataStruct( $data, $this->properties['location'] );
    }