These medicines are called antisecretory because they work by blocking the acid secretion of the stomach.
This is the case of the H2 antihistamine (such as Cimetidine) which has a rapid action (approximately 1 hour) but longer than an antacid.
When symptoms are frequent, occurring more than once a week, proton pump inhibitors (PPIs) (such as Omeprazole), antisecretory agents of potent and prolonged action (at least 24 hours), constitute the treatment of choice.