Exposure to/contact with air, and to a lesser extent light, is the enemy. The dry powder in the original factory packaging should last longer than mixed liquid---assuming that however each is stored, air space in the container is absolutely minimized.
One strategy with liquids is to make the large amount (typically 1 gallon, ≈4 liters) per the directions, but instead of storing it in a single large bottle, store it is smaller containers that hold enough for one developing session, thereby avoiding the air space that occurs when the volume of developer in a large container is drawn down over time.
Concentrated liquids suffer the from same vulnerability to air exposure as dilute liquids. Dark glass is considered better than plastic. Store in the dark in any case.