1

Storing user specific data (like loginAccountId etc.) in cache is how much benificial?

As user logins in system if we store LoginAccountID in cache instade of session is benificial or not?

What issue i ll face if store in cache?

Amogh
  • 4,453
  • 11
  • 45
  • 106
  • Non-recreatable data should go in session, e.g. user-input. Don't put anything in a cache unless you're willing (and able) to retrieve it again. – Paul Grime Apr 09 '13 at 08:33
  • Kind of a duplicate, but the answer is here: http://stackoverflow.com/questions/428634/advantages-of-cache-vs-session – Jeff Apr 09 '13 at 08:34

1 Answers1

1

Actually, session variable on server was designed to cache user-specific data. Storing user-specific data in cache like reinventing the wheel.

Khanh TO
  • 48,509
  • 13
  • 99
  • 115
  • means there is no need to keep data in cache right? session will do the same think, right? also session is created per user/session so session is more benificial..Thanks for your reply. – Amogh Apr 09 '13 at 09:21
  • User-specific data should be in session. As that is what session was designed for. Cache should be used to store application specific data. Regards. – Khanh TO Apr 09 '13 at 09:35