Memory Effects in Stochastic Ratchets