Pasta is a cereal product and because of that it requires appropriate storage conditions and only following the rules of this storage will guarantee that the product will preserve lasting quality and freshness.
It is recommended to store dry pasta (i.e. before cooking) in tightly sealed container in a dry and cold place (in temperature not exceeding 20 °C).
However, if the pasta is already cooked, it should not be stored in a refrigerator for longer than 24 hours. It often happens that after taking it out of the refrigerator, pasta has dried ends. In order to prevent that, you should just cover the boiled portion of pasta with food wrap or aluminium foil. Ordinary plastic bags will be perfect as well.