There was a similar thread about this recently, to which I contributed.
I have just finished a 5 litre container of Ilford MG developer, and it was good to the end, 10 (TEN) years after purchase.
To get to this length of time though, I decanted the 5L into 1 litre chemical bottles, immediately upon receipt. The bottles are made of the same stuff the developer came in.
After each use, the bottle was topped up with Tetenal Protectan; it's not cheap but does the job brilliantly.
The biggest saving though, is knowing that a 5L canister of the developer, costs about the same as two 1L sized bottles.
I also bought a 5L bottle of fixer at the same time and did exactly as I have with the developer. Only a little has 'sulphured out' at the bottom of the bottle, so I still got a very good deal out of it.
Terry S