Added new session system, more simple

This commit is contained in:
Antonio de la Rosa 2016-04-13 03:20:50 +02:00
parent 79a7f2291d
commit 4bebd7a6c4
10 changed files with 172 additions and 55 deletions

View file

@ -50,38 +50,14 @@ cookie_name = 'paramecio.session'
#More simple sessions. Save the session in a file in ./sessions directory.
"""
session_opts = {
'session.type': 'file',
'session.cookie_expires': False,
'session.data_dir': './sessions',
'session.auto': False, # Is better use s.save by performance
}
"""
# More fast methods for beaker sessions.
# Method for save info in cipher cookie. Don't use it if you want save many info in the session (cookies have 4k size limit normally). The default.
session_opts = {
'session.type': 'cookie',
'session.cookie_expires': False,
'session.data_dir': './sessions',
'session.auto': False, # Is better use s.save by performance
'session.validate_key': 'im smoking fool' #Key Generated by paramecio cmd using os.random, more secure if you want add or change random characters
'session.data_dir': './sessions'
}
# Method for save info in a memcached server.
"""
session_opts = {
'session.type': 'ext:memcached',
'session.auto': False, # Is better use session.save by performance
'session.url': '127.0.0.1:11211'
}
"""
key_encrypt="im smoking fool"
cache_session_opts = {