Resistive random-access memory (RRAM) has shown great potential for neuromorphic engineering, due to its ability of emulating neural network and simple structure. To mimic the brain-learning behavior, two types of neural actions, short-term plasticity (STP) and long-term potentiation (LTP), should be imitated perfectly. In this work, we propose a unique RRAM cell with a double switching layer, in which a 2D material is embedded as a separation layer. Within a proper voltage range of stress, the mobile oxygen ions are blocked by the single atomic layer, and hence the subsequent relaxation of oxygen ions leads to a volatile switching characteristic. Owing to this volatile characteristic, the proposed device can mimic neural actions, STP and LTP, by a simple pulse train with different repetitions and frequencies without the complicated pulse settings of spike-timing-dependent plasticity (STDP). For various learning algorithms in future brain-inspired applications, different switching materials with different bind energies and relaxation times of oxygen ions can be utilized.