The cap has little to do with battery life. Ultimately the current thru the solenoid comes from the battery.
A cap can momentarily supply a higher current, which is then backfilled a little later and more spread out in time from the battery. That can be useful for loads that draw currents in large spikes but with a low average. In that case, the cap can let the battery see more the average rather than the spikes. This can be good for a battery.
However, that is not the case here. A solenoid is a inductor with significant series resistance from the circuit's point of view. When switched on, the current thru the solenoid will be a exponential decay towards the steady state value. It won't ever exceed the steady state draw that the battery has to be able to handle anyway. In this case, there is little point in a reservoir cap to power a solenoid.
The only reason I can think of one being useful for solenoid power is if the connection back to the power supply (the battery in this case) had such high resistance that there is significant drop on the solenoid voltage in steady state. This might be the case, for example, if the solenoid and switch is at the end of a long cable. In that case, the cap provides a higher voltage for a short time when the solenoid is switched on. This is likely when it needs more force. Depending on the external mechanics, it may be good to have a initial higher pull, which can then be relaxed a bit once the solenoid has finished traveling. This is common in relays, for example, where the two are often referred to as the turn-on current and the holding current.