A high-capacity, semipermanent optical memory