package com.fp.general.rules.save;

import com.fp.dto.rules.TransactionRule;
import com.fp.dto.save.SaveRequest;
import com.fp.persistence.commondb.cache.CacheManager;

/**
 * Clase que borra la caché de la aplicación
 * 
 * @author amerchan
 * @version 2.1
 */
public class EraseCache extends TransactionRule {

    private static final long serialVersionUID = 1L;

    @Override
    public SaveRequest normalProcess(SaveRequest pSaveRequest) throws Exception {
        CacheManager.getInstance().cleanAll();
        return pSaveRequest;
    }

    @Override
    public SaveRequest reverseProcess(SaveRequest pSaveRequest) throws Exception {
        return pSaveRequest;
    }

}
