Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session data storage improvement #100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

akoncius
Copy link
Collaborator

Closes #98

@stangls
Copy link
Contributor

stangls commented Nov 18, 2016

This approach solves the issue of storing multiple values as session-data.
But I currently can not see in which way this closes #98.
The idea of #98 was to have type-safe access to session-data from the users perspective. For example, when storing an Int in the first request, I would like the framework to actually give me back an Int in the next request (instead of Any?).
In #98 I provided an example with the generic type T being returned when calling get on a SessionFetcher.

@akoncius
Copy link
Collaborator Author

ohhh, right. my bad. Will take a look


private var data: HashMap<String, Any?> = hashMapOf()

fun get(name: String) : Any? {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to override the get and set operators here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants