fix prefix.mak for mac
impl astream cache
move gstream cache