cachesession

package
v0.0.0-...-bc05beb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2014 License: MIT Imports: 10 Imported by: 0

README

Cache based sessions for Revel

This module implements a simple cache based session storage for Revel. The cache is Revel's implementation, which means it can be configured shared for several servers if necessary.

Usage

init.go:

import (
    "github.com/mikkolehtisalo/revel/cachesession"
)
    revel.Filters = []revel.Filter{
        cachesession.CacheSessionFilter, // Use cache based session implementation.
    }

app.conf:

# cachesession
# Allow the session be used only if the requests come from the same IP address
session.iplock=true 

Documentation

Index

Constants

View Source
const (

	// Used for distinguishing different types of data in cache
	SESSION_CACHE_ID = "SESSIONCACHE_"

	// Used for finding the designated session ID from the map
	SESSION_ID_KEY = "SESSION_ID"

	// Used for finding the session IP from the map
	SESSION_IP = "SESSION_IP"
)

Variables

This section is empty.

Functions

func CacheSessionFilter

func CacheSessionFilter(c *revel.Controller, fc []revel.Filter)

Filter for revel to load & save the session with requests

func HashId

func HashId(s revel.Session) string

Get the hash random hash identifying the session.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL