If the oil is not rancid, use it! Various oils I think have different shelf lives. The temperature of the storage area can also be a factor for shelf life.
HOWEVER:
Don’t ever throw away spent or rancid cooking oil of any kind! It can be converted to fuel for small lamps.
http://www.geekprepper.org/make-oil-lamp-used-cooking-oil/