Magnets lose their magnetism if they are not stored properly. Bar magnet and horseshoe magnets are stored differently.
Bar magnets must always be stored in pairs with their opposite poles on the same side. A piece of wood is kept in between to separate them.
In the case of a horse-shoe magnet, a single magnet keeper should be kept in such a way that it should touch both the poles of the magnet.