0

I wish to know if there is way to evict/clear the session even thogh Im using SQLite.

I have a lot of data that i want to save, and commit all in one transaction. I use session.flush() and then session.evict() after every save, but the ram still raise and there is overflow.

Any ideas ? Thanks a lot.

2 Answers 2

0

You require Session.Clear() before Session.Abandon because of following reason

Session.Clear() will CLEAR the values of all the keys but will NOT cause the session end event to fire.

Session.Abandon() will NOT clear the values on the current request. IF another page is requested, the values will be gone for that one. However, abandon WILL throw the event.

It would be better to use Session.Clear() rather than using Session.Abandon() because the values still exist in session after calling Session.Abandon() but are removed after calling the Session.Clear() .

Sign up to request clarification or add additional context in comments.

3 Comments

Im not using asp, the session is an isession object so i do not have abandon function. Im also do need to erase everything from the session to prevent the memory ezxception.
How this article can help me exectly ?
0

You should be using IStatelessSession when inserting a large number of records.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.