private void TicketUIForm_FormClosing(object sender, FormClosingEventArgs e) { //Por posibles fallos en medio no llega a limpiar la cache, aqui eliminamos la sesion y la cache Expedients exps = Cache.Instance.Get(typeof(Expedients)) as Expedients; if ((exps != null) && (exps.Session() != null)) { exps.CloseSession(); } Cache.Instance.Remove(typeof(Expedients)); Cache.Instance.Remove(typeof(ProductList)); }
protected override void CleanCache() { //Por posibles fallos en medio no llega a limpiar la cache, aqui eliminamos la sesion y la cache Expedients exps = Cache.Instance.Get(typeof(Expedients)) as Expedients; if ((exps != null) && (exps.Session() != null)) { exps.CloseSession(); } Cache.Instance.Remove(typeof(Expedients)); Cache.Instance.Remove(typeof(BatchList)); Cache.Instance.Remove(typeof(ProductList)); Cache.Instance.Remove(typeof(ClienteList)); }