J
J
jenya77712017-12-28 23:07:30
Node.js
jenya7771, 2017-12-28 23:07:30

How to update client data in session?

Hello, for authorization in the application on node I use sessions, in them I store, in addition to information about the user, information about the available currency. The question arose, how can I update the value of this currency for the client, if I changed its amount from the admin panel?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Decadal, 2017-12-28
@jenya7771

Do not store information that does not concern the user in the session.
Use databases and caches like Redis or Memcached for this.
Caches have a special dependency mechanism that resets the cache as soon as dependency changes have been detected.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question