A proposal for all-optical buffering