Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How large is the Meteor session

Tags:

meteor

From the Meteor documentation:

Session provides a global object on the client that you can use to store an arbitrary set of key-value pairs. Use it to store things like the currently selected item in a list.

Question: "Arbitrary" might be a little too vague for developers. How is the is the Meteor session implemented on the client and what are its limitations (if any) ?

like image 879
Olivier Refalo Avatar asked Apr 21 '12 13:04

Olivier Refalo


People also ask

What is session in meteor?

Session provides a global object on the client that you can use to store an arbitrary set of key-value pairs. Use it to store things like the currently selected item in a list.

How do I use Session on meteor?

Sessions are used for saving data while the users are using the app. This data will be deleted when the user leaves the app. In this chapter, we will learn how to set a session object, store some data, and return that data. We will use the basic HTML setup.


1 Answers

The implementation of Session is very light weight. It's basically a key-value store that can also store and invalidate reactive contexts. It is also a good starting point for learning how to extend meteor with your own reactive functions.

You can read the whole implementation here: https://github.com/meteor/meteor/blob/master/packages/session/session.js

like image 148
greggreg Avatar answered Oct 10 '22 04:10

greggreg